Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMemory issue: pipeline, event_loop and image_cache stay in memory for a pretty long time #25926
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Decoded images take a pretty large amount of space in memory.
The image cache holds decoded images.
The image cache has the same life time as the event loop.
The event loop is reused when the domain doesn't change:
So, navigating from foo.com/a, to foo.com/b, to foo.com/c, we keep images of a in memory.
Also, we do not drop pipelines until we reach 20 pipelines in memory. And both the pipelines and event_loop need to be dropped for the images to be freed.
Relying on the lifetime of the pipeline/event_loop is probably not the best strategy when it comes to image caching. We could move the image cache into the pipeline instead of the event_loop. And set the pipeline count limit a bit lower for devices like HoloLens. We could also have a way to flush the image cache when under memory pressure.