Skip to content

Improve editor performance and responsiveness - #234

Merged
stevebauman merged 6 commits into
masterfrom
performance-improvements
Oct 14, 2026
Merged

stevebauman merged 6 commits into
masterfrom
performance-improvements

Conversation

@stevebauman

@stevebauman stevebauman commented Jul 11, 2026 •

Copy link
Copy Markdown
Owner

This moves syntax highlighting into a worker, loads Monaco and image export code on demand, and only renders the theme cards near the visible area. Resizing and preview updates are batched to keep typing and dragging responsive.

I've preserved Monaco's editor features and language support, made asynchronous theme and language changes ignore stale results, and ensured pending appearance changes are saved when switching tabs. Highlighting and preview capture now each have a shared composable that owns their scheduling and cleanup. Export and Copy wait for the latest highlighted code, while Safari retains the clipboard timing it requires.

Thumbnail generation no longer repeats because its own image changed, and the app shell and highlighting worker remain available offline. Monaco's language loaders are indexed once and reused. The editor component is client-only so its browser runtime and language modules stay out of Cloudflare's server bundle.

Validated with 155 passing tests, Cloudflare Pages and desktop production builds, and an Electron smoke check covering highlighting, theme previews, and PNG export over the app:// protocol with external network requests blocked. Earlier browser checks also covered editor resizing, JSON formatting, tab switching, and offline reopening.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 11, 2026 •

Copy link
Copy Markdown

Deploying showcode with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6bd1432
Status: ✅  Deploy successful!
Preview URL: https://c4004495.showcode.pages.dev
Branch Preview URL: https://performance-improvements.showcode.pages.dev

View logs

@stevebauman
stevebauman merged commit 2a9e69b into master Oct 14, 2026
3 checks passed
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