in reply to Re^6: WWW::Mechanize::Firefox delayed returns / slow
in thread WWW::Mechanize::Firefox delayed returns / slow
The $need_response is a (failed) optimization. I always need to store the response, even if it is not requested immediately. Later on, you might ask for $mech->code or other stuff contained only in the response.
The rest of the behaviour depends on the site in question, so I can't really say what makes it happen without seeing some more, sorry.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: WWW::Mechanize::Firefox delayed returns / slow
by tcordes (Novice) on Dec 03, 2010 at 09:51 UTC | |
OK, I've made a good small sample program using a public site.
With all the added debug prints I put in the module, my output looks like this. Note the time()'s which show insane delays at nearly every step. In fact, this sample program runs simply horribly. It's infinitely worse than my in-progress program which at least mostly works now. Note, I've taken out the wait 20 sec dropout code.
Got a ton of deep recursion errors and had to ^C it. Note how long the content() call takes, and while running it takes up 100% of one of my cores. | [reply] [d/l] [select] |
by Corion (Patriarch) on Dec 03, 2010 at 14:36 UTC | |
I used the following, slightly changed, script, but it works very well for me. I've removed the superfluous event setting and parameters that WWW::Mechanize::Firefox doesn't support:
Note that I had to allow Javascript in the Noscript plugin for deviantart.net, as the second URL uses Javascript to display a single image. Other than that, I get the following (relatively quick) output:
If you are feeling adventurous, you can use the following, changed Javascript to make Firefox display an alert box whenever it captures an event:
| [reply] [d/l] [select] |
|
Re^8: WWW::Mechanize::Firefox delayed returns / slow
by tcordes (Novice) on Dec 03, 2010 at 08:39 UTC | |
Is there some code I could plunk in to see what firefox events *are* firing through MozRepl? I'm putting in every name of every event I can find on the net hoping to hit the right one. I'm going to try to find a public site I can replicate this problem on with a smaller sample program. | [reply] |
by Corion (Patriarch) on Dec 03, 2010 at 12:48 UTC | |
Sorry, but I'm not aware of any "catch-all" way to see a list of all events fired by Firefox (respectively a Firefox window or browser object). | [reply] [d/l] [select] |