Skip to content

markdown_preview: Fix slow checkbox check/uncheck UI updates#48633

Merged
bennetbo merged 1 commit intozed-industries:mainfrom
wesleynw:fix-slow-checkbox-ui
Mar 6, 2026
Merged

markdown_preview: Fix slow checkbox check/uncheck UI updates#48633
bennetbo merged 1 commit intozed-industries:mainfrom
wesleynw:fix-slow-checkbox-ui

Conversation

@wesleynw
Copy link
Copy Markdown
Contributor

@wesleynw wesleynw commented Feb 6, 2026

When checking a box in the markdown preview, it's generally very slow.

Preview updates when typing in the editor are debounced to be every 200ms, but when clicking an element in the preview, it feels sluggish to wait that long.

In debugging, I found that the debounced task from the editor event subscriptions replaced the non-debounced event on line 605, and the UI took around 200 ms to update.

Therefore, I've changed the markdown parsing function to not replace the task, unless another non-debounced task comes along. UI updates from the editor are still debounced.

Before:
Screencast_20260206_145702.webm

After:
Screencast_20260206_150124.webm

Release Notes:

  • Improved speed at which markdown lists update after checking or unchecking items

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 6, 2026
@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Feb 6, 2026
@maxdeviant maxdeviant changed the title markdown_preview: fix slow checkbox check/uncheck ui updates markdown_preview: Fix slow checkbox check/uncheck UI updates Feb 6, 2026
@wesleynw
Copy link
Copy Markdown
Contributor Author

@bennetbo I saw that this was assigned to you. Anything I can do to help this move along?

Copy link
Copy Markdown
Member

@bennetbo bennetbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@bennetbo bennetbo merged commit 0e83147 into zed-industries:main Mar 6, 2026
36 checks passed
@wesleynw wesleynw deleted the fix-slow-checkbox-ui branch March 6, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants