For Programmers: Free Programming Magazines  


Home > Archive > PERL Modules > October 2005 > The IPC::ShareLite is very slow than fetch data from file ??









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

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

2005-10-25, 7:55 am

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



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com