Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Function computeWorkingSetBudgetBytes

    • The eager child loader's share of the heap headroom left outside the cache pool (computeNonCacheRemainderBytes): half of it. The L2 write-queue retain takes a quarter (see computeOpfsWriteQueueBudgetBytes) and the last quarter is claimed by neither, while the absolute cap prevents a large V8 heap limit from recreating an eight-wide allocation spike. Note that this budget is handed to several independent consumers in full — see the ledger on the share constants — so it bounds each of them, not their sum.

      Parameters

      • OptionalheapLimitBytes: number

        Override for the device heap limit (tests). When omitted, readHeapLimitBytes is consulted; invalid explicit values skip the heap path without probing browser state.

      • OptionalpoolOverrideBytes: number

        Explicit total cache pool in bytes. Takes precedence over the heap-derived budget.

      • OptionalfallbackPoolBytes: number

        Device-class total cache pool in bytes, used only when neither an explicit pool nor a measurable heap is available.

      Returns number