The IPC::ShareLite is very slow than fetch data from file ??
The IPC::ShareLite is very slow than fetch data from file ??
am 25.10.2005 13:04:57 von sonet.all
time shmTest.pl
....
0.11u 0.02s 0:00.13 100.0%
------------------------------------------------------------ ----------------
---
time fileTest.pl
....
0.01u 0.01s 0:00.02 100.0%
=================================================
fileTest.pl
=================================================
#!/usr/local/bin/perl
open(HANDLE,"/usr/local/octopus/html/test.conf");
print join('',);
close(HANDLE);
=================================================
shmTest.pl
The data is load from /usr/local/octopus/html/test.conf
=================================================
#!/usr/local/bin/perl
use IPC::ShareLite;
$share = new IPC::ShareLite( -key =>'test.conf',
-destroy => 'no' ) or die $!;
$confstr = $share->fetch;
print $confstr;
The IPC::ShareLite is very slow than fetch data from file ??
am 25.10.2005 13:25:05 von sonet.all
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('',);
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;
}
Re: The IPC::ShareLite is very slow than fetch data from file ??
am 25.10.2005 19:24:21 von xhoster
"sonet" wrote:
Subject is: Re: The IPC::ShareLite is very slow than fetch data from file
??
Yes, and my yugo gets bad gas mileage when I'm dragging a piano around
behind it. What's your point?
.....
> #!/usr/local/bin/perl
>
> use IPC::ShareLite;
> for ($i=0;$i<=1000;$i++){
> $share = new IPC::ShareLite( -key =>'test.conf',
> -destroy => 'no' ) or die $!;
Why are you creating the shared memory object in a loop?
Also, the key is supposed to be an integer or a 4 character string, not
a file name.
Finally, why are using shared memory when you don't seem to be sharing any
memory?
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
Re: The IPC::ShareLite is very slow than fetch data from file ??
am 26.10.2005 04:12:07 von sonet.all
> Why are you creating the shared memory object in a loop?
Just for testing.
> Also, the key is supposed to be an integer or a 4 character string, not
> a file name.
I know . but it will erase the character that the length >4.
> Finally, why are using shared memory when you don't seem to be sharing any
> memory?
Ok. I put some static html or conf to sharememory.
¦b¶l¥ó news:20051025132421.197$NM@newsreader.com ¤¤¼¶¼g
....
> "sonet" wrote:
>
>
> Subject is: Re: The IPC::ShareLite is very slow than fetch data from file
> ??
>
> Yes, and my yugo gets bad gas mileage when I'm dragging a piano around
> behind it. What's your point?
>
> ....
> > #!/usr/local/bin/perl
> >
> > use IPC::ShareLite;
> > for ($i=0;$i<=1000;$i++){
> > $share = new IPC::ShareLite( -key =>'test.conf',
> > -destroy => 'no' ) or die $!;
>
> Why are you creating the shared memory object in a loop?
>
> Also, the key is supposed to be an integer or a 4 character string, not
> a file name.
>
> Finally, why are using shared memory when you don't seem to be sharing any
> memory?
>
> Xho
>
> --
> -------------------- http://NewsReader.Com/ --------------------
> Usenet Newsgroup Service $9.95/Month 30GB