Repository navigation
Defer Markdown parsing and reduce shared workspace JavaScript - #4520
Merged
Merged
Conversation
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.
Human comments
What was wrong
After #4512, the shared workspace route still imported thread-only screens, Markdown's HTML parser/sanitizer, and editor extensions that are always disabled. Plugin SDK registration also imported its embedded conversation renderer. TipTap's published blockquote bundle contained another copy of ProseMirror.
What changed
@tiptap/pm/stateTextSelection instead of bundled copies.<; coordinate fetch/import so first use does not download twice. Plain Markdown text remains visible while loading or failed; sanitization is unchanged.Production JavaScript, decimal Brotli bytes; overlapping closures are deduplicated:
These are app JavaScript closures, excluding plugin asset files, CSS, fonts and user data. Actual thread visits still need the thread code. A thread that immediately needs HTML totals 962,084 Brotli bytes, 12,319 more than the old combined route because splitting changes compression and chunk sharing; the largest benefit is on non-thread visits. Normal warmed execution excludes the 45,476 HTML Brotli bytes until needed.
LOC: runtime/build +243 net; tests +236; dependency metadata +48; docs +28. The separate 6,074-line vendor patch is mostly deletions of duplicated generated ProseMirror, not 6,074 lines of application code. No review stories, fixtures, preview providers, SDK or wire contracts were added.
How you verified