Fixed for decoder dl speed and mobile warnings on low memory devices.
This commit is contained in:
@@ -52,11 +52,18 @@ export function isLikelyMobile(
|
||||
|
||||
/**
|
||||
* Fraction of reported device RAM a single tab can safely peak at before
|
||||
* mobile OSes intervene. Conservative on purpose — `deviceMemory` already
|
||||
* caps at 8 regardless of actual RAM, and the tab competes with the rest of
|
||||
* the OS, the browser process itself, and other open tabs.
|
||||
* mobile OSes intervene.
|
||||
*
|
||||
* D-029: the original 0.5 was not conservative enough — `deviceMemory` is
|
||||
* commonly 2-4 on ordinary (not just flagship) Android phones today, and at
|
||||
* 0.5 that already yields a 1-2 GB "safe" budget, clearing every model in
|
||||
* the catalog including Medium (~556 MB peak) and Large v3 Turbo (~762 MB) —
|
||||
* silently skipping the warning for exactly the phones D-027's crash report
|
||||
* was about. 0.1 keeps mid/low-end phones (deviceMemory ≤ 4) warned for
|
||||
* Medium+ while still exempting genuine high-end devices (deviceMemory ≥ 6,
|
||||
* 600+ MB budget) that have real headroom to spare.
|
||||
*/
|
||||
const SAFE_TAB_FRACTION_OF_DEVICE_MEMORY = 0.5;
|
||||
const SAFE_TAB_FRACTION_OF_DEVICE_MEMORY = 0.1;
|
||||
|
||||
/**
|
||||
* Fallback risk threshold when `deviceMemory` isn't reported (notably all of
|
||||
|
||||
Reference in New Issue
Block a user