in reply to Webpage "get" slow with WWW::Mechanize

I'm guessing it's hanging on something, and only completing after timing out, but I have no idea what that could be, or how to fix it--if it's fixable--from my end.

Sounds highly plausible. Have you tried reducing the timeout in your WWW::Mechanize object?

  • Comment on Re: Webpage "get" slow with WWW::Mechanize

Replies are listed 'Best First'.
Re^2: Webpage "get" slow with WWW::Mechanize
by nick2253 (Initiate) on Nov 16, 2015 at 21:55 UTC
    Honestly, I'm not sure how. There's nothing obvious (to me) in the documentation to adjust it. However, I'm pretty infamous for overlooking really obvious things :/

      The page linked in my previous post says:

      WWW::Mechanize is a proper subclass of LWP::UserAgent and you can also use any of LWP::UserAgent's methods.

      So, you can use LWP::UserAgent's timeout method. eg:

      my $ua = WWW::Mechanize->new; $ua->timeout (5);