in reply to Re: WWW::Mechanize::Firefox delayed returns / slow
in thread WWW::Mechanize::Firefox delayed returns / slow
Success! I debugged and hacked some of the pm code and got the mech to go without hangs or overly long pauses.
What I did is just a kludge, but it could hint at the real solution.
I found that the get() was calling synchronize(). Synchronize would be slow (5-20 secs) on the $callback->(). The big problem though is after get()ing a couple of pages the subsequent _wait_while_busy($load_lock) hangs forever.
So in _wait_while_busy I added before the while loop: my $start=time; and added at the end of the for loop: return $element if time-$start>5;
Now my program seems to work as expected! Hooray!
Obviously we're waiting on events that never happen. Again, some global timeout might help. Or, a rejig of this code if this is a true bug (and not just a quirk of the site I'm crawling).
I can continue to help as required. Thanks!
|
|---|