Thank you for clarifying @DTS Engineer. I have submitted more information and clarified some misunderstandings in my feedback report.
This info is especially useful to know:
The view re-draw process is driven by the UI framework, and so there is nothing you can do at the TextKit level.
Though, since I'm in the default UITextView zone, I'm not sure I can do much to optimize drawing here. I'm hoping to get some more info from Apple that could help me avoid redundant drawing, as I'd rather avoid building custom text views.
As for performance regressions in my app: I have already analyzed the CPU usage and optimized it quite a bit. This process was performed in several stages, last of which was to try and optimize by utilizing the viewport, and while working on that I have figured the draw is called many times. (Just for reference, the initial implementation I had was resulting in about 10-15 FPS while scrolling, and the code I used wasn't that bad; it was just called way too often.)
The logic I have in the draw(at:in:) method override is very optimized now, but as you can imagine, even the most optimized variant could run slowly when called many times, especially for bigger paragraphs.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: