The IPC::ShareLite is very slow than fetch data from file ??
- From: "sonet" <sonet.all@xxxxxxxxxxxxx>
- Date: Tue, 25 Oct 2005 19:25:05 +0800
time shmTest.pl
...
0.65u 0.61s 0:01.43 88.1%
---------------------------------------------------------------------------
-
---
time fileTest.pl
...
0.30u 0.52s 0:01.03 79.6%
=================================================
fileTest.pl
=================================================
#!/usr/local/bin/perl
for ($i=0;$i<=1000;$i++){
open(HANDLE,"/usr/local/octopus/html/test.conf");
print join('',<HANDLE>);
close(HANDLE);
}
=================================================
shmTest.pl
The data is load from /usr/local/octopus/html/test.conf
=================================================
#!/usr/local/bin/perl
use IPC::ShareLite;
for ($i=0;$i<=1000;$i++){
$share = new IPC::ShareLite( -key =>'test.conf',
-destroy => 'no' ) or die $!;
$confstr = $share->fetch;
print $confstr;
}
.
- Follow-Ups:
- References:
- Prev by Date: The IPC::ShareLite is very slow than fetch data from file ??
- Next by Date: How should I announce the list of delayed class/object/method loaders?
- Previous by thread: The IPC::ShareLite is very slow than fetch data from file ??
- Next by thread: Re: The IPC::ShareLite is very slow than fetch data from file ??
- Index(es):