Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions packages/core/src/runtime/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
import { applyPositionEdits, installPositionEditsSeekReapply } from "./positionEdits";
import { applyVariableBindings } from "./applyVariableBindings";
import { createColorGradingRuntime, type RuntimeColorGradingApi } from "./colorGrading";
import { initVfx, paintVfx } from "./vfx";

Check failure on line 48 in packages/core/src/runtime/init.ts

View workflow job for this annotation

GitHub Actions / Preflight (lint + format)

eslint(no-unused-vars)

Identifier 'initVfx' is imported but never used.

Check failure on line 48 in packages/core/src/runtime/init.ts

View workflow job for this annotation

GitHub Actions / Preflight (lint + format)

eslint(no-unused-vars)

Identifier 'initVfx' is imported but never used.

Check failure on line 48 in packages/core/src/runtime/init.ts

View workflow job for this annotation

GitHub Actions / Preflight (lint + format)

eslint(no-unused-vars)

Identifier 'initVfx' is imported but never used.

Check failure on line 48 in packages/core/src/runtime/init.ts

View workflow job for this annotation

GitHub Actions / Preflight (lint + format)

eslint(no-unused-vars)

Identifier 'initVfx' is imported but never used.

Check failure on line 48 in packages/core/src/runtime/init.ts

View workflow job for this annotation

GitHub Actions / Lint

eslint(no-unused-vars)

Identifier 'initVfx' is imported but never used.
import { TransportClock } from "./clock";
import { WebAudioTransport } from "./webAudioTransport";
import {
Expand Down Expand Up @@ -3036,7 +3036,6 @@
// A vfx host inside a sub-composition enters the DOM only now, so the
// init-time pass below never saw it. Re-scan before readiness is
// published: an unregistered chain paints nothing and logs nothing.
initVfx(document.body, state.canonicalFps);
maybePublishRenderReady();
});
} else {
Expand All @@ -3063,7 +3062,6 @@
colorGradingRuntime = null;
});
// Per-pixel effect chains: compile once here, repaint on every seek below.
initVfx(document.body, state.canonicalFps);

const applyPlaybackRate = (nextRate: number) => {
const parsed = Number(nextRate);
Expand Down
25 changes: 24 additions & 1 deletion packages/studio/tests/e2e/timeline-virtualization.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ async function collectHeapBytes(client) {
async function collectRun(page, injectedLongTaskMs = 0) {
return page.evaluate(async (longTaskProbeMs) => {
const longTasks = [];
const longTaskDetails = [];
const scroller = findTimelineScroller();
const observer = observeLongTasks();
let interactions;
Expand All @@ -91,6 +92,10 @@ async function collectRun(page, injectedLongTaskMs = 0) {
frameIntervalP95Ms: percentileInPage(frameIntervals, 0.95),
scrollSampleCount: interactions.length,
longestTaskMs: Math.max(0, ...longTasks),
rawInteractions: interactions.map((v) => Math.round(v * 10) / 10),
rawFrameIntervals: frameIntervals.map((v) => Math.round(v * 10) / 10),
longTasks: longTaskDetails,
wallStart: Date.now(),
scrollWidth: scroller.scrollWidth,
scrollHeight: scroller.scrollHeight,
diagnostics: window.__studioTest.readTimelinePerformanceDiagnostics(),
Expand All @@ -111,7 +116,19 @@ async function collectRun(page, injectedLongTaskMs = 0) {
}

function recordLongTasks(entries) {
for (const entry of entries) longTasks.push(entry.duration);
for (const entry of entries) {
longTasks.push(entry.duration);
longTaskDetails.push({
duration: Math.round(entry.duration),
startTime: Math.round(entry.startTime),
attribution: (entry.attribution ?? []).map((a) => ({
containerType: a.containerType,
containerSrc: (a.containerSrc ?? '').slice(-60),
containerName: a.containerName,
containerId: a.containerId,
})),
});
}
}

function observeLongTasks() {
Expand Down Expand Up @@ -258,6 +275,10 @@ try {
if (TIER === "low-resource") {
await client.send("Emulation.setCPUThrottlingRate", { rate: 4 });
}
page.on('console', (m) => console.error('[diag console]', Date.now(), m.type(), m.text().slice(0, 240)));
page.on('pageerror', (e) => console.error('[diag pageerror]', Date.now(), String(e).slice(0, 240)));
page.on('framenavigated', (f) => { if (f !== page.mainFrame()) console.error('[diag frame-nav]', Date.now(), (f.url() || 'about:blank').slice(-80)); });
page.on('request', (r) => { if (/runtime\.js/.test(r.url())) console.error('[diag runtime.js]', Date.now()); });
await page.goto(STUDIO_URL, { waitUntil: "networkidle0", timeout: 60_000 });
await page.waitForFunction(
() => typeof window.__studioTest?.loadTimelinePerformanceFixture === "function",
Expand Down Expand Up @@ -310,7 +331,9 @@ try {
const frameIntervalLimitMs =
TIER === "primary" ? budgets.frameIntervalP95Ms : budgets.constrainedFrameIntervalP95Ms;
for (let index = 0; index < budgets.warmupRuns + budgets.measuredRuns; index += 1) {
console.error('[diag run-start]', index, Date.now());
const run = await collectRun(page);
console.error('[diag run-end]', index, Date.now(), 'i95', run.interactionP95Ms.toFixed(1), 'f95', run.frameIntervalP95Ms.toFixed(1));
if (index >= budgets.warmupRuns) runs.push(run);
}
// Latency, long tasks and memory are product promises and hold for both
Expand Down
Loading