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-ammonext
andthree
cross dependency.
$ yarn
(ornpm install
)$ aurelia run --watch
- http://localhost:9000/
- Open http://localhost:9000/
- Open Chrome task manager (
Shift
+Esc
) - Show
GPU Memory
column (Right Click
menu) - Search for the
AureliaWHS - Home
tab and observeGPU Memory
column - In the SPA tab navigate to
WHS View
then toHome
and 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
dependencies
array of thevendor-bundle.js
right 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?