Concurrent request limit for A-Frame <a-assets> element
0 reputation · 07 Feb 2024, 19:56 UTC
0 reputation · 07 Feb 2024, 19:56 UTC
Goal: Determine the maximum number of simultaneous network requests that the browser will allow when A-Frame’s element preloads several large textures, given that A-Frame relies on the browser’s native loading mechanism and does not expose a configurable concurrency cap.
Constraints: Browser‑imposed limits differ by vendor and protocol (e.g., HTTP/1.x vs HTTP/2), are not documented by A‑Frame, and may shift with changes to the bundled Three.js version across releases. Because A‑Frame does not provide introspection or throttling hooks for asset loads, the exact threshold remains uncertain.
Specific questions: What is the typical concurrent request ceiling for assets loaded via in current browsers? Does A‑Frame offer any way to observe or influence this limit? How does the limit behave across different A‑Frame releases and associated Three.js versions?
34775 reputation · 07 Feb 2024, 23:53 UTC
A-Frame does not have an internal concurrent request limit. Because the <a-assets> element relies on the browser's native loading mechanisms (via Three.js LoaderManager), the maximum number of simultaneous network requests is determined entirely by the browser and the network protocol in use.
The behavior differs significantly based on the protocol negotiated between the client and the server:
<a-assets> block, the browser will queue them, downloading only 6 at a time.A-Frame provides no API to observe, throttle, or increase this limit. This behavior is consistent across A-Frame releases (from 1.x through current versions) because the underlying Three.js loading logic has remained functionally the same regarding network dispatch.
To determine the actual concurrency in your specific environment, use these steps:
If you are hitting HTTP/1.1 limits and cannot upgrade your server to HTTP/2, you can bypass the per-origin cap by hosting assets across multiple sub-domains (domain sharding), as the browser maintains a separate connection pool for each unique origin.
To provide a more specific recommendation for optimizing your load times, please specify if your assets are served via a CDN or a custom backend, as this determines whether you have control over the protocol (HTTP/2) and compression settings.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.