@3dsource/angular-unreal-module 0.0.149-dev.0 → 0.0.149-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6176,29 +6176,6 @@ class StreamStatusTelemetryService2 {
|
|
|
6176
6176
|
const sigDur = wsOpenMs - startMs;
|
|
6177
6177
|
const webDur = readyMs - wsOpenMs;
|
|
6178
6178
|
const connectMs = readyMs - startMs;
|
|
6179
|
-
// Main-thread blocking from the OPTIONAL `perf-longtask.js` head-script. If
|
|
6180
|
-
// that script isn't on the page `window.__streamPerf` is undefined and
|
|
6181
|
-
// these stay 0 — nothing breaks. Tasks carry page-`performance.now()` start
|
|
6182
|
-
// times, so window them against the raw (pre-`toMs`) ready/adoption marks:
|
|
6183
|
-
// bootBlockingMs — total over [0, adoption]: overall JS cost to boot.
|
|
6184
|
-
// adoptBlockingMs — within [ready, adoption]: how much of the
|
|
6185
|
-
// "awaiting Angular code" gap was the thread actually
|
|
6186
|
-
// blocked by JS (vs idle waiting). ≈gap ⇒ JS-bound;
|
|
6187
|
-
// ≈0 ⇒ the app was just slow to reach the adopt call.
|
|
6188
|
-
const readyPerf = t['ready'] ?? t['dc_open'] ?? t['ws_open'] ?? s.startedAtPerf;
|
|
6189
|
-
const tasks = window.__streamPerf?.longTasks ?? [];
|
|
6190
|
-
let bootBlockingMs = 0;
|
|
6191
|
-
let adoptBlockingMs = 0;
|
|
6192
|
-
let maxLongTaskMs = 0;
|
|
6193
|
-
for (const lt of tasks) {
|
|
6194
|
-
if (lt.start > now)
|
|
6195
|
-
continue; // ignore tasks after adoption
|
|
6196
|
-
bootBlockingMs += lt.dur;
|
|
6197
|
-
if (lt.dur > maxLongTaskMs)
|
|
6198
|
-
maxLongTaskMs = lt.dur;
|
|
6199
|
-
if (lt.start >= readyPerf)
|
|
6200
|
-
adoptBlockingMs += lt.dur;
|
|
6201
|
-
}
|
|
6202
6179
|
// Savings, anchored at the moment Angular reached the connect call.
|
|
6203
6180
|
const savings = {
|
|
6204
6181
|
prefetched: true,
|
|
@@ -6209,10 +6186,6 @@ class StreamStatusTelemetryService2 {
|
|
|
6209
6186
|
adoptionWaitMs: Math.max(0, adoptionAtMs - sessionStartMs),
|
|
6210
6187
|
// Gap between the prefetch being ready and Angular adopting it.
|
|
6211
6188
|
adoptionOverheadMs: Math.max(0, adoptionAtMs - readyMs),
|
|
6212
|
-
// Main-thread blocking (longtask) — diagnoses whether the gap is JS-bound.
|
|
6213
|
-
bootBlockingMs: Math.round(bootBlockingMs),
|
|
6214
|
-
adoptBlockingMs: Math.round(adoptBlockingMs),
|
|
6215
|
-
maxLongTaskMs: Math.round(maxLongTaskMs),
|
|
6216
6189
|
};
|
|
6217
6190
|
// Region (phaseNo 1) — served from the ping cache during prefetch (~0),
|
|
6218
6191
|
// positioned at the prefetch start; ship the samples.
|