analyze-startup-performance

Diagnose Electron editor startup and workspace restore slowdowns using Startup Performance reports.

Updated May 13, 2026
One-click install
npx skills add https://github.com/lovebirdsx/universe-editor --skill analyze-startup-performance-lovebirdsx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: analyze-startup-performance
Source: https://github.com/lovebirdsx/universe-editor/tree/main/.claude/skills/analyze-startup-performance
Command: npx skills add https://github.com/lovebirdsx/universe-editor --skill analyze-startup-performance-lovebirdsx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When one workspace starts noticeably slower than another, it is hard to tell whether the cause is a code regression or differences in workspace state and size. This Skill reads Startup Performance reports (Phases and Marks tables), isolates variables like git presence and directory scale, and guides adding fine-grained perf marks to break open black-box phases. ## Core Features & Use Cases - Report interpretation: Aligns two Startup Performance reports phase-by-phase to locate where the time difference lands, avoiding traps like parallel-task mis-pairing and out-of-order lazy marks. - Variable isolation: Runs controlled experiments (rename .git, compare small repos, close persisted tabs) to separate code regressions from workspace state or scale differences. - Instrumentation workflow: Adds new PerfMarks constants, emits marks at correct async boundaries, and updates TimerService MILESTONES so new phases appear correctly in the report. - Use Case: A user reports "opening directory A is 3 seconds slower than directory B". Use this Skill to compare their two Startup Performance screenshots, determine the gap sits in workspace restore phases rather than early bootstrap, then isolate whether directory size or git is responsible before touching any code. ## Quick Start Compare these two Startup Performance reports from directories A and B and tell me which phase regressed and whether it is a code or workspace issue.

Frequently Asked Questions about analyze-startup-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose why one workspace starts slower than another?

Compare the two Startup Performance reports phase-by-phase using Phase durations, not absolute mark offsets. If differences concentrate in restore-related phases like Services restored or Editors restored, the cause is likely workspace state or size rather than a code regression.

How to interpret the Startup Performance Phases and Marks tables?

The Phases table pairs adjacent milestones from the MILESTONES list and shows their duration, while the Marks table shows absolute offsets of all marks. Adjacent pairing only works for serial milestones; parallel tasks must be compared by their Marks offsets directly.

Does a git repository slow down editor startup?

Not directly. The git extension runs in a lazily spawned extension host after first paint. The real effect is indirect: git repos tend to be large directories, so recursive file watching and Explorer tree reads consume CPU that competes with renderer restore.

Why do some marks appear out of order in the startup timeline?

Lazy-triggered marks like extHostDidSpawn or didInitializeMonaco can land after window mount. TimerService sorts by startTime before pairing, so their neighbors in the Phases table may be misleading; check the will-to-did pair duration instead.

How do I add a new performance mark to measure a startup phase?

Add a constant to PerfMarks in marks.ts, call mark() at the emit point after awaiting the relevant lifecycle phase, and add serial boundaries to TimerService.MILESTONES. Keep parallel completion points out of MILESTONES to avoid mis-pairing.

Why is dev mode startup slower than the packaged build?

Vite dev transforms modules on demand and loads the renderer module graph over HTTP, adding structural cost to bootstrap. After changing optimizeDeps.include, the first two runs rebuild caches and run slower; measure from the third run for stable numbers.