Repository navigation
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.
The DOM renderer never merges a decorated cell into a span (
!isDecoratedin the merge check), so every decorated cell gets a<span>of its own. An addon that colours words with decorations (log levels, timestamps, addresses) turns a 23-character timestamp into 23 spans. In an app on 6.0.0 that does this, streaming a log in WebKit with the DOM renderer dropped from about 174 to 91 frames in 3 seconds, and the median frame gap while scrolling went from 16 to 37 ms. With this change both were back to what they are without decorations.Cells now share a span when they are covered by the same single decoration, as cells with the same attributes already do. A cell under several decorations, or under a different decoration than the open span, still starts a new span. A decoration applies the same colours and the same
xterm-decoration-topclass to every cell it covers, and the other merge conditions (fg/bg/ext, selection, link hover, spacing, cursor, joined ranges) are checked as before.Tests:
DomRendererRowFactory.test.tswith the realDecorationService: cells under one decoration share a span (fails without the change), two adjacent decorations of the same colour stay separate spans, and overlapping decorations don't merge.