Repository navigation
Conversation
Every edit marked the row starts dirty from the edited line, and the content height then rebuilt them to the end of the document: 20 ms of handler time over 60 keys on a 10k-line file at 8x CPU throttle. The layout now keeps a running row total and extends the row starts only as far as a lookup needs.
A scroll write makes the browser lay the page out at once. syncScroll wrote both axes whenever a reveal moved either one, 18 ms over 60 keys of a 300-line file at 8x CPU throttle. It now leaves an axis alone when it matches the position the draw last read or wrote.
A typed letter rebuilt every span of its line, so the forced layout that measures the line's width redid the whole line: prepare took 102 ms over 60 keys of a 300-line file at 8x CPU throttle. A line whose runs keep their count and styles now only gets new text in the nodes that changed.
A minified file is one line, and with no language it was one text node of the whole line. WebKit spends time on a Range in proportion to its node, so every caret and selection rect cost about 0.35 s a key on a 2M-character line. Runs longer than 4096 units now split into text nodes, after a space or punctuation when one is near the limit, and the same line draws in about 100 ms, as in Chromium.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
On Linux CI, WebKit painted a six-column selection across two text nodes as 53 px against 51 px for the same columns measured in one range, because each piece's rect rounds out to whole pixels. The check now allows one pixel for every painted piece.
This branch has not been deployed
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.
four speedups for typing on the web. the numbers in 1 to 3 are desktop Chrome at 8x CPU throttle:
syncScrollwrote both scroll axes whenever a reveal moved either one, and every scroll write makes the browser lay the page out, 18 ms over 60 keys of a 300-line file. an axis that matches the position the draw last read or wrote is left alone now.preparetook 102 ms over 60 keys of a 300-line file. a line whose runs keep their count and styles only gets new text in the nodes that changed.with the first three, 300 lines at 8x had key work p95 of 6.5 to 7.7 ms against an 8 ms gate.