Skip to content

perf: lazy-load heavy client bundles, parallelize API reads, drop dead deps, type the parser#9

Merged
Emp1500 merged 5 commits into
mainfrom
worktree-perf-and-code-audit
Jul 13, 2026
Merged

perf: lazy-load heavy client bundles, parallelize API reads, drop dead deps, type the parser#9
Emp1500 merged 5 commits into
mainfrom
worktree-perf-and-code-audit

Conversation

@Emp1500

@Emp1500 Emp1500 commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Changes

  • Lazy-load the three.js DottedSurface background behind next/dynamic. The 516KB three.js chunk no longer blocks initial load on /, /login, /register.
  • Defer Monaco and Mermaid (CodeEditor.tsx, ShareView.tsx, FlowchartPanel.tsx) behind next/dynamic / dynamic import() with loading states, so the editor shell paints before those libraries download.
  • Parallelize the two independent Supabase reads in GET /api/flowcharts/[id] with Promise.all instead of sequential awaits — one fewer round trip on every editor/share page load.
  • Remove dead dependencies (next-themes, tw-animate-css) and move shadcn/@types/three from dependencies to devDependencies.
  • Replace any with precise AST types across lib/parser/javascript.ts, typescript.ts, python.ts, dropping the file-wide eslint-disable in favor of narrow interfaces per node shape.
    No user-visible behavior, routes, or API response shapes changed.

@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
code2flow Ready Ready Preview, Comment Jul 13, 2026 10:30am

@Emp1500
Emp1500 merged commit 423814b into main Jul 13, 2026
3 checks passed
@Emp1500
Emp1500 deleted the worktree-perf-and-code-audit branch July 14, 2026 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant