aframevr / aframevr/aframe

Memory leaks, memory management

Open
#4,161 2 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
17.6k
Forks
4.4k
PR merge metrics
No merged PRs in 30d

Description

I open this issue because I can't reopen https://github.com/aframevr/aframe/issues/3779, closed although there are some serious issues which are not addressed.

A fix is still needed to manage Context lost, which can have various reasons, not only models unloading/loading (see above for another one, maybe others exist).

Regarding the models loading/unloading : pooling is not sufficient if you have many models. You have a limited quantity of RAM available at any given point in time, so you have to dynamically load only what you need right now and unload the rest. As mentionned here, I posted some more in depth analysis about this here. TLDR : I'm using a workaround for the time being, which is unfortunately failing to fully release the memory, so my app is still being exposed to memory overflow.

Also, in a SPA, when you navigate between pages all having their own scene, each scene is destroyed/created each time, as the instance they live in is created/destroyed dynamically, so the idea of keeping the same scene throughout the user experience doesn't work.

So far, I really enjoy programming with A-Frame but to me, memory management is the really big downside that makes the engine unreliable for building ambitious projects. Really hoping for enhancements.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the prior issue #3779 and the reported cases around WebGL context loss, model loading and unloading, and scenes being destroyed and recreated in a SPA. Done would require a defined approach that prevents the reported memory leaks and handles context loss reliably, but the issue does not name files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.