Open davidbalbert opened 1 year ago
I will remeasure once I get to this, but it looks like the big offenders are:
lineCache.set(_:forRange:)
in layoutLineIfNecessary
AttributedRope.init(_: AttributedSubrope)
in LayoutManager.nsAttributedSubstring(for:in:)
before turning the AttributedRope into an NSAttributedString.For the former, all the time is spent in Spans builder. I wonder if I can get a speed up by inserting a bunch at the same time.
For the latter, maybe I can add an initializer that makes an NSAttributedString directly from an AttributedSubstring.
FWIW, the jank is mostly not present in Release builds, but I still sometimes get to pretty high CPU, and it'd be nice to lower that.
Observe the jank.