Open aimass opened 2 years ago
UPDATE: the time seems to be proportional to the number of rows. The 2-3 second timing is for a table with 450 rows and 12 columns. On a table with 120 rows, it's less than a second. Speculating: it would seem that relative to node xpath has some bug and may be scanning the whole table each time.
See also this post. Most helpful would be a short, self-contained script to reproduce the issue.
Sure thing, I'll try to replicate the issue with some public site that has a table with a few hundred records, and follow up here and on PM.BTW, I actually wrote that post on PM ;-)
I updated that post and added a workaround at the end combining W::M::Chrome xpath to find the table node and then HTML::Tree to parse the table. I think this actually a good approach and reduces the Chrome overhead anyways.
Here you go: https://perlmonks.org/?node_id=11148399
Hi there!
If there's a mailing list pls. let me know and I'll post the discussion there.
This is taking 2 to 3 seconds on average: my @cells = $mech->xpath('.//td', node => $rows[$row_index]);
what is making it so slow ?? Is there a way to speed this?
TIA!
-- Alex