Click here to get back home

The IPC::ShareLite is very slow than fetch data from file ??

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
The IPC::ShareLite is very slow than fetch data from file ?? sonet 10-25-2005
Posted by sonet on October 25, 2005, 7:04 pm
Please log in for more thread options


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('',<HANDLE>);
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;






Posted by sonet on October 25, 2005, 7:25 pm
Please log in for more thread options


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;
}





Posted by xhoster on October 25, 2005, 5:24 pm
Please log in for more thread options




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


Posted by sonet on October 26, 2005, 10:12 am
Please log in for more thread options


> 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.




....
>
>
> 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




Similar ThreadsPosted
Data File October 6, 2008, 10:18 am
XS PM needs big data file (~80mb) to operate August 7, 2008, 11:38 am
not able to fetch the request December 28, 2005, 8:58 pm
HTTP::Proxy - how to detect start and end of URL fetch September 26, 2004, 6:00 am
XML Parsing too slow November 19, 2005, 7:29 am
Net::SSH::Perl extremely slow? July 12, 2005, 8:04 pm
install HTML::Template - Problem reading cache file / Bad file number July 24, 2004, 7:55 pm
Reading contents of an excel file from a test file May 15, 2007, 2:49 am
A do-file location: how the code inside that do-file find it? January 20, 2008, 12:32 am
use DBI - how to properly get the data out October 15, 2004, 1:02 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap