Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
PostgreSQL 9.3 beta: Federated databases and more
LWN.net Weekly Edition for May 9, 2013
(Nearly) full tickless operation in 3.10
Yeah we do, but does it really cache a bitmap of the page? That would seem a bit silly
Posted Jul 27, 2007 21:57 UTC (Fri) by man_ls (subscriber, #15091)
Yeah we do, but does it really cache a bitmap of the page?
That would seem a bit silly
When people complain that "Firefox eats up 2 GB" in a 4 GB machine, it gives the wrong impression. Firefox runs fine on my 128 MB laptop, and memory seldom goes above 80 MB.
Posted Jul 28, 2007 13:38 UTC (Sat) by Los__D (guest, #15263)
I'm not completely sure how uncompressed PNG would handle the JPEG's on the page, but I couldn't imagine it getting worse (memory wise) than bitmap, just equal. (I've been known to be naive in my expectations from formats though).
The browser (toolkit?) could of course also do some kind of checking of available memory, and change algorithm from that, but maybe that is an unneeded complexity.
I don't know, maybe it's easiest/simplest and mostly correct to just keep the rendered pages as is in memory, but for some usage patterns, it does become a huge waste of memory.
Posted Jul 28, 2007 13:51 UTC (Sat) by man_ls (subscriber, #15091)
I would never (never EVER) suggest using JPEG for computer graphics
But caching in a lossless format such as PNG isn't such a good idea either. An important aspect of caches is that you should store an artifact which you already have, not one you have to generate. If you have to compress a bitmap to PNG before caching it, you are wasting a lot of CPU time just to generate a cache which you might as well never use again.
An example: you download a JPEG image, then uncompress it to show it, and then you compress it to PNG before caching it in memory. Messy.
Posted Jul 28, 2007 14:00 UTC (Sat) by Los__D (guest, #15263)
For most usage patterns, I agree, but for those that likes to have 30+ tabs open (for some reason), caching the uncompressed bitmap is a _big_ waste.
The question is if the best approach wouldn't be to just forget or limit those caches for that kind of usage. At least the bitmap approach is asking for disk trashing.
Posted Oct 9, 2007 18:49 UTC (Tue) by Blaisorblade (guest, #25465)
IMHO (and this is my opinion, I don't recall his one) a reasonable solution would be to extend the X protocol to allow caching compressed images in most reasonable formats (including especially JPEG). Then the X server can keep a cache of most shown decoded images.
Since the JPEG compression ratio is huge, there would be a huge gain from this.
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds