Gossamer Forum
Home : General : Perl Programming :

Speed Theory...

Quote Reply
Speed Theory...
I'm just wondering something. Does anyone know / has anyone done any benchmarking on this ...

Basically, I have to use the HTML from a routine in more than one place per script install. Basically this means that I am passing the HTML too-and-from routines quite a lot.

Something like this;

Code:
#!/usr/bin/perl

use strict;
use LWP::Simple;

sub _test1 {
# --------------------------------------


my $got = get('http://www.perl.com') || die $!;

_test2($got);

}

sub _test2 {
# --------------------------------------

my $got = $_[0];

# do something to $got here
$got = s/\<b\>(.+?)\<\/b\>/$1/gi;

print "Content-type: text/html \n\n";
print $got;

}

Basically, I wan't to know if it would be better (in terms of large pages), to pass the URL through the routine, and simply reuse get() to grab the page...

...or...

Keep passing the HTML through to the routines (i.e. I'm not sure if it is quicker to pass a URL into the servers memory, and then do stuff to it... or send the URL, and regrab the page and start processing?)

TIA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Subject Author Views Date
Thread Speed Theory... Andy 11470 Jan 26, 2004, 8:13 AM
Thread Re: [Andy] Speed Theory...
Chaz 11247 Jan 26, 2004, 12:55 PM
Thread Re: [Chaz] Speed Theory...
Andy 11235 Jan 27, 2004, 12:56 AM
Post Re: [Andy] Speed Theory...
Wil 11257 Jan 27, 2004, 3:37 AM
Thread Re: [Andy] Speed Theory...
Chaz 11207 Jan 27, 2004, 6:51 AM
Thread Re: [Chaz] Speed Theory...
Andy 11253 Jan 27, 2004, 6:55 AM
Thread Re: [Andy] Speed Theory...
Chaz 11222 Jan 27, 2004, 7:29 AM
Thread Re: [Chaz] Speed Theory...
Andy 11259 Jan 27, 2004, 7:35 AM
Post Re: [Andy] Speed Theory...
SeanP 11138 Jan 29, 2004, 8:09 AM
Thread Re: [Andy] Speed Theory...
Alex 11164 Jan 29, 2004, 2:17 PM
Thread Re: [Alex] Speed Theory...
Andy 11264 Jan 29, 2004, 2:19 PM
Thread Re: [Andy] Speed Theory...
Alex 11158 Jan 29, 2004, 2:28 PM
Thread Re: [Alex] Speed Theory...
Andy 11236 Jan 29, 2004, 2:31 PM
Post Re: [Andy] Speed Theory...
paladin 11045 Mar 21, 2004, 12:42 PM