You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using puppeteer just to extract some information from html, setting the content using page.setContent(). This is extremely slow, even though I never navigate to an actual website.
blank: 3568.199ms
no blank: 191955.917ms
Done in 196.83s.
Without goto("about:blank") in between setContent calls it is 50x! slower.
I found this by accident. If this can't be fixed, it should at least be mentioned in the docs, since setContent seems to be the canonical method to load html from a string.
The text was updated successfully, but these errors were encountered:
phiresky
changed the title
Repeated setContent is 50x slower without goto('about:blank') in between than without
Repeated setContent is 50x slower without goto('about:blank') in between than with it
Dec 13, 2018
Hey! I have exactly the same issue, can't provide the code since it's not open-sourced tho but it's almost the same as in example above.
I pass the Page to one function, and if page is not redirected to 'about:blank' first and I use .setContent() - it will cause an infinite loading and reach default 30000ms timeout.
I'm using puppeteer just to extract some information from html, setting the content using page.setContent(). This is extremely slow, even though I never navigate to an actual website.
Steps to reproduce
Minimal example:
Output:
Without
goto("about:blank")
in betweensetContent
calls it is 50x! slower.I found this by accident. If this can't be fixed, it should at least be mentioned in the docs, since
setContent
seems to be the canonical method to load html from a string.The text was updated successfully, but these errors were encountered: