Memory increase when using wasm decoder in DRACO Loader

Description of the problem

When using wasm decoder in DRACO Loader, the memory will increase even if you refresh page. And the memory will be freed when you close the tab.

The webgl_loader_draco example can reproduce this issue, just comment the following line, and it will use wasm decoder.

diff --git a/examples/webgl_loader_draco.html b/examples/webgl_loader_draco.html
index 1eaf08f2e..46c321f50 100644
--- a/examples/webgl_loader_draco.html
+++ b/examples/webgl_loader_draco.html
@@ -47,7 +47,7 @@

                // Configure and create Draco decoder.
                THREE.DRACOLoader.setDecoderPath( 'js/libs/draco/' );
-               THREE.DRACOLoader.setDecoderConfig( { type: 'js' } );
+               // THREE.DRACOLoader.setDecoderConfig( { type: 'js' } );
                var dracoLoader = new THREE.DRACOLoader();

And then take heap snapshot:


Three.js version
  • Dev
  • r102
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS

Author: Fantashit

1 thought on “Memory increase when using wasm decoder in DRACO Loader

Comments are closed.