Gecko caching is pretty broken
|Reported by:||jg||Owned by:||blizzard|
|Deployments affected:||Action Needed:|
Right now, when you use tabs, the Gecko web browsing engine used in Firefox (and Sugar), forgets to ever free any images out of its cache. So this is an out and out bug that needs to be fixed. Federico Mena-Quintero wrote this up in his blog last fall.
Furthermore, Gecko keeps three copies of the data around: the compressed image, an uncompressed image in Gecko's address space, and another as a pixmap in the X server.
This is silly beyond belief. To begin with, if gecko is running locally, moving the image from gecko to X should be blindingly fast using Linux domain (or TCP) sockets.
Given modern machines, if we had fast image decompression code, even a copy in Gecko's address space uncompressed is probably pretty silly, and/or could be computed for a page or so backwards in a thread if one wants forward/back to be blindingly fast. Optimizing this decompression code so that one would be happy to throw away the uncompressed image would be a great improvement.
So people helping out the Mozilla project in this area would make a major improvement, not only for OLPC, but for all Linux desktop users. This situation is so bad I've seen Firefox eat over half a gigabyte of RAM (half in Firefox, half as pixmaps in the X server) in a single day's use, causing paging.