-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit attr runs less frequently by accumulating length of color run (#…
…6919) The act of calling `InsertAttrRuns` is relatively slow. Instead of calling it a bunch of times to meddle with colors one cell at a time, we'll accumulate a length of color and call it to make it act all at once. This is great for when one color full line is getting replaced with another color full line OR when a line is being replaced with the same color all at once. There's significantly fewer checks to be made inside `InsertAttrRuns` if we can help it out by accumulating the length of each color before asking it to stitch it into the storage. Validation ---------- - Run `time cat big.txt` and `time cat ls.txt` under VS Performance Profiler.
- Loading branch information
Showing
1 changed file
with
77 additions
and
45 deletions.
There are no files selected for viewing
This file contains 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