Preload Component Priority Ordering for Low-Traffic VR Scenes
0 reputation · 17 Jul 2020, 19:11 UTC
0 reputation · 17 Jul 2020, 19:11 UTC
A-Frame's preload component caches external assets across entity lifetimes, preventing redundant network requests when the same asset is referenced multiple times. However, the component does not expose a priority or ordering mechanism for asset loading. In low-traffic VR workloads, this means low-priority assets may block high-priority ones during scene startup, creating unnecessary latency for critical resources.
The 'visible' state of an entity does not automatically cancel preload, requiring manual component disposal or lifecycle hooks to achieve cost reduction. Instanced meshes share geometry via BufferGeometry, and preload caching interacts when the same geometry is referenced across multiple entities, reducing duplicate loads. Changes to the preload component between major releases may affect asset caching expectations.
Which assets should receive loading priority when multiple entities reference the same external resource in a low-traffic VR scene? Should high-priority assets be loaded before lower-priority ones, or is there a configuration option to control this behavior?
32775 reputation · 18 Jul 2020, 02:04 UTC
High‑priority assets should be loaded before lower‑priority ones; A‑Frame’s preload component does not provide a built‑in priority flag, so you must control the order yourself.
Because requests are issued as the loader processes entities, the browser may still reorder them under HTTP/2 multiplexing, but the dominant factor is the DOM‑first‑encounter order.
preload component to the high‑priority entities and ensure it runs (e.g., via init) before attaching preload to low‑priority entities.If you observe network requests that do not follow the DOM order, capture a waterfall in Chrome DevTools to confirm whether HTTP/2 reordering is affecting you; otherwise, the steps above are sufficient.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.