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

Optimize the internals of QFutureInterface

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P2: Important
    • None
    • 6.0, 6.1, 6.2
    • Core: Threads
    • None
    • 8
    • Qt6_Foundation_Sprint 34, Qt6_Foundation_Sprint 35, Qt6_Foundation_Sprint 36

    Description

      QFutureInterfaceBasePrivate is a rather large object, and larger than it has to be.

      By redesigning it and related classes like QtPrivate::ResultStoreBase, we should be able to reduce the memory overheads of QFuture.

      Some ideas:

      • Put the ResultStoreBase and ExceptionStore into a union, we only will ever need one of them at the same time.
      • Change ResultStoreBase to know how to destruct its contained type; then we can get away with only having a single refcount.
      • Allocate progress related classes only on-demand. For simple use-cases of QFuture, much of this isn't needed.

      Attachments

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

        Activity

          People

            sonakur Sona Kurazyan
            fabiankosmale Fabian Kosmale
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes