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.
Attachments
For Gerrit Dashboard: QTBUG-92045 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
339938,3 | QFutureInterfaceBasePrivate: reorder members to save 8 bytes | dev | qt/qtbase | Status: MERGED | +2 | 0 |
353558,4 | QFuture: put the result store and the exception store in a union | dev | qt/qtbase | Status: MERGED | +2 | 0 |
353559,4 | Allocate progress related data on demand | dev | qt/qtbase | Status: MERGED | +2 | 0 |
353560,4 | Add basic benchmarks for QFuture | dev | qt/qtbase | Status: MERGED | +2 | 0 |