Skip to content

Commit c80171c

Browse files
committed
perf(studio): drop the added comment lines the ratchet counts
1 parent 0407447 commit c80171c

3 files changed

Lines changed: 0 additions & 5 deletions

File tree

‎packages/core/src/runtime/init.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2948,8 +2948,6 @@ export function initSandboxRuntimeModular(): void {
29482948
// A clip's first visible style pass is slow; playing, each hidden clip gets it once just before its start.
29492949
const clipsNeverStyledVisible = new Set<StylableElement>();
29502950
const clipsStyledVisible = new WeakSet<Element>();
2951-
// Starts of those clips, resolved once per timing revision: resolving every one on every tick built a
2952-
// resolver and walked each ancestor chain per clip, which at thousands of clips filled the main thread.
29532951
let neverStyledStarts = { revision: -1, starts: new Map<StylableElement, number>() };
29542952
const neverStyledStart = (el: StylableElement, revision: number): number => {
29552953
if (neverStyledStarts.revision !== revision)

‎packages/studio/src/player/hooks/timelineSyncHydration.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,6 @@ export function buildTimelineElementsFromClips(
225225
hostEl,
226226
});
227227
});
228-
// One occurrence index per selector for the whole walk: per clip, each lookup queried the document and
229-
// resolved the source file of every match, which is quadratic in clips sharing a class.
230228
return iframeDoc ? withSelectorIndexPass(iframeDoc, build) : build();
231229
}
232230

‎packages/studio/src/player/lib/timelineDOM.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ export function parseTimelineFromDOM(
236236
rootDuration: number,
237237
timelines?: Readonly<Record<string, TimelineLike>>,
238238
): TimelineElement[] {
239-
// One occurrence index per selector for the whole scan; see buildTimelineElementsFromClips.
240239
return withSelectorIndexPass(doc, () => scanTimelineFromDOM(doc, rootDuration, timelines));
241240
}
242241

0 commit comments

Comments
 (0)