Skip to content

Expose 'Max Concurrent Requests' in Network settings #2119

Description

@mvaligursky

Summary

The engine is gaining a configurable limit on the number of concurrent asset requests, to avoid browsers rejecting requests with net::ERR_INSUFFICIENT_RESOURCES when a project preloads a large number of assets at once (see playcanvas/engine#5258).

The engine reads a maxConcurrentRequests property from the application/project settings (parsed in AppBase._parseApplicationProperties, right alongside the existing maxAssetRetries), and also exposes it at runtime as app.loader.maxConcurrentRequests. The default is 128; a value of 0 disables throttling.

Request

Expose this as a "Max Concurrent Requests" field in the Network settings panel, next to the existing Asset Retries field. The editor should write the value into the project config under maxConcurrentRequests, mirroring how Asset Retries writes maxAssetRetries, so the engine picks it up automatically.

Notes

  • Suggested default in the UI: 128.
  • A value of 0 should mean "unlimited / throttling disabled".
  • Depends on the corresponding engine change landing first (tracked by Throttle large number of assets requests? engine#5258).
  • The user-manual Network Settings page is being updated with this setting in a docs PR.

Related: playcanvas/engine#5258

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions