Linear Performance Techniques Plan (Web + Electron)

1) Techniques from the post

From the startup-performance post, the concrete techniques are:

  1. Refactor and optimize startup data loading (especially pre-warmed clients with local DB data).

  2. Switch build system to improve bundle output (Linear moved Parcel → Rollup; for us this means evaluating best bundling config/tooling for startup + size).

  3. Lazy-load infrequently used app code and infrequently used data.

  4. Target modern browser/runtime capabilities to avoid shipping legacy transforms/polyfills where unnecessary.

  5. Improve dead code elimination (tree-shaking).

  6. Code-split by route/feature boundaries.

  7. Preload code before it is needed (intent-based prefetch/preload).

Scale/architecture follow-up from the large-workspace post:

  1. Treat large-workspace scaling as first-class architecture work (not only micro-optimizations).

  2. Continuously profile and remediate hot paths for large datasets.

2) What fits Web vs Electron

Notes:

  • Web has more network variance pressure, so preload strategy must be bandwidth-aware.

  • Electron has stronger control of runtime (Chromium version) and benefits heavily from deterministic startup work and memory discipline.

3) Per-app priority / criticality

Legend: P0 = must do now, P1 = should do next, P2 = nice follow-up

4) Phased implementation plan

Phase 0 — Baseline & guardrails (1 week)

  • Define SLOs: warm startup, cold startup, first interactive list, memory steady-state.

  • Add measurement in both apps (same metric names; per-workspace-size segmentation).

  • Create “small / medium / large workspace” test fixtures.

  • Exit criteria: Reliable baseline dashboards + repeatable local benchmark script.

Phase 1 — Startup critical path (1–2 weeks)

  • Reduce synchronous startup work.

  • Defer non-critical initialization.

  • Optimize local data hydration path for pre-warmed sessions.

  • Exit criteria: Meaningful warm-start improvement on both Web and Electron.

Phase 2 — Bundle strategy (1–2 weeks)

  • Audit bundle graph by route/feature.

  • Enforce route/feature code splitting.

  • Tighten modern targets and tree-shaking settings.

  • Exit criteria: Lower initial JS bytes and faster cold start.

Phase 3 — Lazy data/code + preload strategy (1–2 weeks)

  • Lazy-load rarely used views/features/data.

  • Add intent-based preloading (hover/soon-to-open routes/workflows).

  • Cap aggressive prefetch on constrained networks.

  • Exit criteria: Faster perceived navigation with no significant bandwidth regressions.

Phase 4 — Large-workspace scalability hardening (2+ weeks, parallel track)

  • Profile pathological large-workspace flows.

  • Rework heavy list/filter/sync hot paths.

  • Add scalability regression tests in CI datasets.

  • Exit criteria: No severe degradation moving from medium to large workspace fixtures.

Phase 5 — Rollout & regression control (ongoing)

  • Feature-flag each major perf change.

  • Roll out progressively (internal → beta cohort → % rollout).

  • Alert on startup, interaction latency, and memory regressions.

  • Exit criteria: Stable production metrics post-rollout.

Recommended immediate execution order

  1. Phase 0 + Phase 1 (highest ROI, lowest product risk).

  2. Phase 2 + Phase 3 (bundle and loading behavior).

  3. Phase 4 in parallel once baseline instrumentation is stable.

  4. Keep Phase 5 always on.

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime