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

Unloading of unused web resources #27

Closed
ksons opened this issue Nov 18, 2013 · 3 comments
Closed

Unloading of unused web resources #27

ksons opened this issue Nov 18, 2013 · 3 comments
Assignees
Milestone

Comments

@ksons
Copy link

ksons commented Nov 18, 2013

Resources are cached in an optimized data structure because they can be used from multiple places inside the scene. The resource manager should track all users of a resource and free the cached resource as soon as no user exists for the resource anymore.

@ksons ksons modified the milestone: 4.6 Dec 5, 2014
@ksons ksons added bug and removed enhancement labels Apr 9, 2015
@ksons
Copy link
Author

ksons commented Apr 9, 2015

This behavior is the intended behavior of XML3D, thus it is a bug if resources are not unloaded automatically.

Due to many locations where we cache resources for performance reasons and the lack of weakmaps until recently, the garbage collector is not able to free all resources.

TODO: Check all locations where resources are cached and replace objets with WeakMap where appropoate

@ksons ksons added this to the Release 5.0 milestone Apr 9, 2015
@csvurt csvurt self-assigned this Jul 6, 2015
@csvurt csvurt modified the milestones: Release 5.1, Release 5.0 Jul 24, 2015
@csvurt
Copy link
Contributor

csvurt commented Jul 24, 2015

Moved this to the resource manager overhaul scheduled for 5.1

@csvurt
Copy link
Contributor

csvurt commented Jan 7, 2016

We identified a lot of areas where stray references were preventing garbage collection of resources after elements were removed from the DOM. This was improved quite a bit in 5.1, memory profiling in Chrome is now relatively stable even when adding and removing hundreds of elements per second.

@csvurt csvurt closed this as completed Jan 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants