Hi, On Sat, May 27, 2006 at 10:46:56PM +0300, Joonas Saarinen wrote:
One of my wishes would be to have some limit for the cache growing endlessly. I run Dillo on a old Libretto 100CT (166MHz/32MB) and if surfing for long periods (especially when viewing large images) the system goes on knees swapping and eventually Dillo gets killed for hogging all the memory. :S Of course there's generally a lot of work to do on the browser and this feature might require significant changes to the code (?)...
Not that hard! Just look inside cache.c and add a remove function for images when the cache size surpasses a certain threshold. An algorithm/heuristic that pleases a diverse group of users is much more difficult. You have to care about not removing images that are currently being displayed (e.g. when using multiple Dillo windows, or removing an image that's being displayed in a page that loads lots of images). Al this blurb reduces to a ref count. -- Cheers Jorge.-