Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory issue: pipeline, event_loop and image_cache stay in memory for a pretty long time #25926

Open
paulrouget opened this issue Mar 9, 2020 · 0 comments

Comments

@paulrouget
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant