You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a half-way implementation of #231, we could initially add a manual mechanism
to empty the cache. Adding an automatic mechanism would require storing some
score in the cache entries, while doing it manually is an easy patch.
The text was updated successfully, but these errors were encountered:
There are several caches in Dillo. The one that seems to occupy the most is the
so called Dicache, which stores uncompressed image buffers. For reference,
loading Brutaldon takes around 100 MiB of uncompressed image size.
The Dicache has several reference counters to avoid removing buffers that are
still in use. Even after they are not used, they will survive three cleanup
attempts.
On the other hand, after closing the page with the images, and calling a_Dicache_cleanup() doesn't seem to be enough to get rid of the cache entries.
Not sure if there are more references somewhere.
This should be easy to test, as we can make a page with large images, load it,
then open a new page without images, clear the cache and ensure the resident
memory usage goes to the initial level.
It doesn't look we are leaking those buffers when closing Dillo.
I have also tested clearing the "normal" cache, which just stores the compressed
images and other resources fetched by HTTP, but it doesn't seem to free that
much memory.
Let me clarify a little bit about what the dicache is.
This is how Dillo works. When you ask for a URL (be it a root URL,
like a HTML, or an image embedded in a page), it looks it up in a memory cache. If it's already there it returns the content of the
cache, and if not it makes a connection to retrieve that URL.
But there is a complication with respect to images. The images which
are downloaded need to be decompressed to be displayed (that is,
transformed from their original format, jpeg, gif, etc, to a bitmap
format). So for images, first the dicache (_d_ecompressed _i_mage
cache) is checked, then the cache, then finally it is retrieved from
the site. The problem with dicache is that it eats up a LOT of
memory, and the only benefit is the processing time of transforming
from the original format to the bitmap. That's why the default is NO.
Good to know that dicache comes from "decompressed image cache".
I assume it is only worth it when we have multiple clones of the same pages
loaded with big images into multiple tabs, so we only need to decompress the
images once.
Other than that, it shouldn't retain any memory after the decompressed images
are evicted.
As a half-way implementation of #231, we could initially add a manual mechanism
to empty the cache. Adding an automatic mechanism would require storing some
score in the cache entries, while doing it manually is an easy patch.
The text was updated successfully, but these errors were encountered: