Stop Chrome from loading full extremely large page

928 views
Skip to first unread message

Joe Otto

unread,
Apr 25, 2018, 2:09:43 PM4/25/18
to Chromium-discuss
Hello, I'm using Google Chrome version 65.0.3325.181 with 64bit Windows 10 Pro.  I have 32gb of RAM and 2xIntel Xeon processors each with 4 physical cores.  I work in a science lab, and some of my data are returned as links to webpages that are massive.  If I "save link as" for one of the result pages, the HTML page downloaded can be upwards of 2gb.  The pages often crash before they are all the way open.  The memory usage of Chrome will go way up, but it usually doesn't go above 2.5gb before it crashes.  The computer itself isn't out of memory though.  When/If I get a page open, if I print it as a PDF there are 200+ pages.  The most important information I need is almost always in the top 25 pages. 

I've had some success using the command below coupled to the end of the data processing so that the results are automatically output to a PDF, but it hangs here too with the larger result pages.  

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --headless --print-to-pdf="%userprofile%\Desktop\PDF_Results\<datafilename>.pdf" <resulturl>

Is there a way to automatically limit the length of the page opened by Chrome?  If I could get it to only open the first 25 pages with something in a command line, that would be fantastic especially if I could include it in the line above.

I know number of pages is relative so I'm not sure there is a way to do this but the rendering of the entire result seems to be too much for Chrome even using the headless version.

Thank you

PhistucK

unread,
Apr 25, 2018, 2:13:23 PM4/25/18
to jjo...@gmail.com, Chromium-discuss
I think there is some command line flag (for Chrome, or maybe for V8) to have a higher memory limit per tab, but that is only part of the problem.

If the server supports range requests (partial responses), you might be able to write some JavaScript code that only loads the first X MB of the file and render them and have a button ("Show more") that will load the next X MB and render them, but this is something you would need to code using JavaScript.


PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

Reply all
Reply to author
Forward
0 new messages