Kaustubh has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I am using the following Packages to scrap WebPages:-
use WWW::Mechanize;
use WWW::Mechanize::TreeBuilder;
I am using a get method to get the url.I print LocalTime before using Get Method and then again I print the LocalTime after Get Method.I find a Time difference of 3 secs.
Is there any way to reduce this time difference?Say from 3 secs to 1 or 1.5 secs?
use strict; use warnings; use WWW::Mechanize; use WWW::Mechanize::TreeBuilder; my $mech = WWW::Mechanize->new; WWW::Mechanize::TreeBuilder->meta->apply($mech); my $datestring = localtime(); print "Local date and time before get method $datestring\n"; $mech->get( "http://www.xxx.com/p/1234" ); $datestring = localtime(); print "Local date and time after get method $datestring\n";
Local date and time before get Wed Aug 17 13:32:19 2016 Local date and time after get Wed Aug 17 13:32:22 2016
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reduction in Processing Time of Get Method
by Corion (Patriarch) on Aug 17, 2016 at 09:05 UTC | |
by Kaustubh (Acolyte) on Aug 17, 2016 at 10:21 UTC | |
|
Re: Reduction in Processing Time of Get Method
by hippo (Archbishop) on Aug 17, 2016 at 09:04 UTC | |
by Kaustubh (Acolyte) on Aug 17, 2016 at 10:18 UTC | |
by hippo (Archbishop) on Aug 17, 2016 at 10:39 UTC |