Integration test for WHS in an Aurelia.io single page app.
The purpose of this repository is to show and try to fix:
- GPU memory leaks with SPA view reloading.
- Bundling issues with
physics-module-ammonextandthreecross dependency.
$ yarn(ornpm install)$ aurelia run --watch- http://localhost:9000/
- Open http://localhost:9000/
- Open Chrome task manager (
Shift+Esc) - Show
GPU Memorycolumn (Right Clickmenu) - Search for the
AureliaWHS - Hometab and observeGPU Memorycolumn - In the SPA tab navigate to
WHS Viewthen toHomeand reproduce this many times.
As you should see it seems that the graphical context is never released and the GPU memory go up until the tab crash. How could we fix this?
- Open
arelia_project/aurelia.json - Add following conf in the
dependenciesarray of thevendor-bundle.jsright underwhs
{
"name": "physics-module-ammonext",
"path": "../node_modules/physics-module-ammonext/build",
"main": "physics-module",
"resources": [
"worker.js"
]
}$ aurelia build
As you should see physics-module-ammonext makes reference to three
and the bundler can't find it in the dependecies so it tries to search
it in the root directory.
How could we achieve the bundling with right references?