News for hackers. Stuff that matters.
Re:New Chrome features to save battery and make browsing smo... by codedokode on Saturday December 10, 2022 @07:26AM (#33932005)
I think it is possible. Typical web process memory size is about 30-500 Mb. Writing 500 Mb sequentially on a spinning HDD takes 5 to 10 seconds, and probably you can discard a lot before saving (like JIT code, JS bytecode, CSS dependency trees, HTTP caches, localstorage etc.), and 500 Mb pages are rare.

For comparison, if you don't unload the page completely, and system gets into swapping then there will be random access pattern with speed about 400 Kb/s on a HDD. So it is faster to unload 500 Mb sequentially than swap out/in 5 Mb.

Re:New Chrome features to save battery and make browsing smo... by Tostino on Saturday December 10, 2022 @07:33AM (#33932049)
This is why getting away from optimizing all our software around the disk being the major bottleneck will be a great thing for computing. So many optimizations become possible when your storage isn't in the hot path.
Re:New Chrome features to save battery and make browsing smo... by andai on Saturday December 10, 2022 @07:34AM (#33932061)
Are you really using a spinny disk? Most SSDs can do 500mb in a second or two.
Re:New Chrome features to save battery and make browsing smo... by eric__cartman on Saturday December 10, 2022 @09:38AM (#33932976)
If you're developing a widely used web browser you have to take into account the people booting from a hard drive made in 2009.
Re:New Chrome features to save battery and make browsing smo... by codedokode on Saturday December 10, 2022 @08:02AM (#33932254)
I considered the worst case, obviously with SSD you can unload pages even faster if you are fine with reducing its lifetime.