Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-938

Suggestion to optimize memory usage of QTextLayout

    XMLWordPrintable

Details

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sletta Gunnar Sletta
            admin Administrator
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes