iTowns / itowns

A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data
http://www.itowns-project.org
Other
1.11k stars 299 forks source link

3dtiles cache clean memory failed. #797

Closed Oncledjoe closed 1 year ago

Oncledjoe commented 6 years ago

The 3dtiles cache is never clean, see picture. This test textured cache has a size of 264.7 Mo and we can see the memory overhead and freeze my computer. This problem is also true without textured cache but the size is very lower so the problem doesn't occur.

Your Environment

Context

I need to visualize 3dtiles cache.

Steps to Reproduce (for bugs)

You need a textured cache. A simple cache works also but doesn't crash you computer

Expected Behavior

Clean memory and video memory.

Actual Behavior

Overflow memory

Possible Cause/Fix/Solution

3dTilesProcessing.js the cleanup function : cleanup3dTileset doesn't work at all! Think to clean webgl memory too.

Looking forward.

Best Regards, issue

Oncledjoe

zarov commented 6 years ago

The problem may be coming from here https://github.com/iTowns/itowns/blob/master/src/Process/3dTilesProcessing.js#L204

Maybe we could change it to use the recently added Cache ?

autra commented 6 years ago

AFAIK this is orthogonal to a cache system: this just cleans tiles not used any more, but don't do it every frame to impact the user less (only 2% of frame, so roughly every 1,5-5 sec depending on the framerate I guess?).

It's very possible this bug comes from this part though :-)

jailln commented 1 year ago

Fixed in #1988