Details
-
Suggestion
-
Resolution: Out of scope
-
P2: Important
-
4.3.0
-
None
Description
When attaching a QTextLayout to each line of text and filling it with proper data (a single text line plus additional formats for highlighting) the memory usage is twice as high compared to an implementation where the document is painted using QPainter.
Perhaps it would be possible with a simpler design involving a single QTextEngine shared by the whole document and a collection of QTextLine would be much lighter.
Note: There are certain thngs we can still do to improve the situation, but it is less than one might think, as QTextLayout (has to) performs a some amount of caching.