markdown_preview: Fix slow checkbox check/uncheck UI updates#48633
Merged
bennetbo merged 1 commit intozed-industries:mainfrom Mar 6, 2026
Merged
markdown_preview: Fix slow checkbox check/uncheck UI updates#48633bennetbo merged 1 commit intozed-industries:mainfrom
bennetbo merged 1 commit intozed-industries:mainfrom
Conversation
Contributor
Author
|
@bennetbo I saw that this was assigned to you. Anything I can do to help this move along? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: