Repository navigation
perf(grid): CJK font fallback; shared cell style and decoration (#1553, #1519) - #1684
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.
Closes #1553. Refs #1519.
#1553 (measured in the issue: CJK text lays out ~40x slower).
QueryaTypography.cjkFontFamilyFallbacklists CJK families for Linux, macOS and Windows. Grid cells, the cell editor and the groupings view keepmonospaceas the primary family and get that list asfontFamilyFallback;monoFontFamilyFallback(editor, inspectors, badges, ERD cards) ends with it, aftermonospace. Latin and Cyrillic text still renders in the system monospace font.#1519. A cell's text style and decoration come from a small cache (4 styles, up to 96 decorations) that is rebuilt when the colour scheme changes, instead of a new
TextStyle,BoxDecoration,Borderand fourBorderSides per cell. I do not expect a visible gain from this part: the app bench on main shows build p50 <= 2.5 ms for the grid scenarios, and unchanged cells are already skipped by_reuseCell. The Grid performance job on this PR will show whether it moves anything; if not, the second half of #1519 can be closed as not worth it.Tests: the typography test now pins the CJK tail and its contents.