Depends on D13902
Summary
Key modifications:
- Add default constructor
but it should not be used -> deprecated(needed to store Keys in Qt containers)
EntityStore modifications:
- Add readLatest functions with Identifier as argument
- Change first readRevision to use a callback taking a Key as argument
- Change all readPrevious (except the templated one) to take an Identifier as argument
- Change one indexLookup to return a vector of Identifiers
fixes "bug" of whole keys as argument of readLatest (whole keys were passed to Source::add -> mIncrementalIds -> DataStoreQuery::readEntity -> EntityStore::readLatest)
TypeIndex modifications
- Change lookup to return a vector of Identifiers
Benchmarks
Run benchmarks:
Develop | D13902 | This patch |
---|---|---|
Current Rss usage [kb]: 40700 | Current Rss usage [kb]: 38484 | Current Rss usage [kb]: 38564 |
Peak Rss usage [kb]: 40700 | Peak Rss usage [kb]: 38484 | Peak Rss usage [kb]: 38564 |
Rss growth [kb]: 15920 | Rss growth [kb]: 13660 | Rss growth [kb]: 13352 |
Rss growth per entity [byte]: 3260 | Rss growth per entity [byte]: 2797 | Rss growth per entity [byte]: 2734 |
Rss without db [kb]: 29736 | Rss without db [kb]: 29504 | Rss without db [kb]: 29248 |
Percentage peak rss error: 0 | Percentage peak rss error: 0 | Percentage peak rss error: 0 |
On disk [kb]: 10788 | On disk [kb]: 8804 | On disk [kb]: 9140 |
Buffer size total [kb]: 898 | Buffer size total [kb]: 898 | Buffer size total [kb]: 898 |
Write amplification: 12.0075 | Write amplification: 9.79923 | Write amplification: 10.1732 |
Note: "On disk" has increased and I'm not sure why
Test Disk Usage:
Develop | D13902 | This patch |
---|---|---|
Free pages: 412 | Free pages: 312 | Free pages: 309 |
Total pages: 760 | Total pages: 607 | Total pages: 599 |
Used size: 1425408 | Used size: 1208320 | Used size: 1187840 |
Calculated key + value size: 856932 | Calculated key + value size: 702866 | Calculated key + value size: 702866 |
Calculated total db sizes: 970752 | Calculated total db sizes: 950272 | Calculated total db sizes: 954368 |
Main store on disk: 3112960 | Main store on disk: 2486272 | Main store on disk: 2453504 |
Total on disk: 3293184 | Total on disk: 2666496 | Total on disk: 2633728 |
Used size amplification: 1.66339 | Used size amplification: 1.71913 | Used size amplification: 1.68999 |
Write amplification: 3.63268 | Write amplification: 3.53733 | Write amplification: 3.49071 |
Note: pages has increased and I'm not sure why (maybe the benchmark ran more samples?)
Like above, disk space has also increased