Morgancentral99 / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

Smart asset cache #273

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Load many assets
2. Not use them for a while (no references to them)
3. They will still be in the cache.

What is the expected output? What do you see instead?
The assets should get automatically garbage collected when not used.

Original issue reported on code.google.com by ShadowIs...@gmail.com on 12 Jan 2011 at 5:00

GoogleCodeExporter commented 8 years ago
This issue is partially complete. 
The collection is done by storing the asset key that was used to load the asset 
in all of its clones. When all clones have been garbage collected the AssetKey 
becomes collectible and the appropriate entry in the WeakHashMap gets removed.
Right now this feature is only available for textures.

Original comment by ShadowIs...@gmail.com on 28 Apr 2011 at 7:25

GoogleCodeExporter commented 8 years ago
Smart asset cache is now enabled for models, textures and materials.
Still to do:
1) Audio streams and buffers
2) Shaders
3) Bitmap text

Original comment by ShadowIs...@gmail.com on 24 Jan 2012 at 8:37

GoogleCodeExporter commented 8 years ago
With the recent changes to the asset system, more assets are now managed by GC. 
HOWEVER there are still issues as the GC is reluctant to clear small objects 
that point to large direct buffers. An alternate, LRU based solution may be 
required.

Original comment by ShadowIs...@gmail.com on 28 May 2012 at 5:54

GoogleCodeExporter commented 8 years ago

Original comment by ShadowIs...@gmail.com on 6 Sep 2012 at 5:35