Closed
Description
The webxr API generates some objects every frame, e.g. the frame and pose objects, which needs the GC to be able to efficiently free them. This is straightforward in a generational GC, we just hint to the GC to run a minor GC at the end of each rAF. The problem is that any per-frame objects that are still live at the end of the rAF will be tenured, so after enough rAFs there will be a major GC, which causes frame rates to drop while it's running. The worst-case scenario for this is if user code keeps access to some of the previous frame's objects, e.g. keep a pointer to last frame's pose data. Then each minor GC will cause an object to be tenured.
Metadata
Metadata
Assignees
Labels
No labels