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

Regression (5-6): memory usage of QPointerEvent and QEventPoints

    XMLWordPrintable

Details

    Description

      In Qt 6 QMouseEvent inherits from QPointerEvent, which has a

          QList<QEventPoint> m_points;
      

      member.

      In turn, QEventPoint is a pimpl (think) class.

      This means that for each mouse event one pays for 2 memory allocations, on top of the (eventual) allocation for the mouse event itself.

      In the super common case for a desktop application this is 3x the number of heap allocations required (and that were done in Qt 5 anyhow).

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              peppe Giuseppe D'Angelo
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes