aframevr / aframevr/aframe

Model does not unload from memory after removing from DOM

Open
#3,137 20 comments 4 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

Description:

A loaded model (gltf-model) doesn't unload from memory after it removed from DOM.

How to reproduce:

  • Wait until page loads
  • When page loads, take a memory snapshot
  • Wait 10-15s before model will appear and loaded, take a snapshot
  • Wait until model will be deleted, take memory snapshot again

Expected behavior: amount of used memory decreases
Real behavior: amount of used memory don't change
image

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 with the reproducible test page at https://pterko.github.io/aframe/memory_bug_demo/test.html and trace the gltf-model lifecycle when its entity is removed from the DOM. Compare memory snapshots before loading, after loading, and after deletion; done means the model's memory is released after removal.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.