in reply to Re^7: WWW::Mechanize::Firefox delayed returns / slow
in thread WWW::Mechanize::Firefox delayed returns / slow
Thank a lot Corion! For future reference, I will explain how your solution solved my problem (4 years later).
I am scraping a page which makes ->content() sooo slow. I tried to replace it with
and that second line (a simple assignment) was still as slow. I copied $content to a file, which weighs almost 1MB. It doesn't seem that big. Is 1MB too big for an assignment?my $sel = ->selector('body', single => 1); my $content = $sel->{innerHTML};
Anyway, I chose a more restrictive selector and now it's blazing fast. If you come across the same problem, this solution might save you too.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: WWW::Mechanize::Firefox delayed returns / slow
by Corion (Patriarch) on Apr 09, 2014 at 17:26 UTC | |
by mascip (Pilgrim) on Apr 10, 2014 at 09:22 UTC | |
by Corion (Patriarch) on Apr 10, 2014 at 09:56 UTC | |
by mascip (Pilgrim) on Apr 10, 2014 at 18:09 UTC |