Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
-
6.0, 6.1, 6.2
-
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.