Depends on D13902
Summary
=======
`Key` modifications:
- Add default constructor ~~but it should not be used -> deprecated~~ (needed to store `Key`s 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 `Identifier`s
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 `Identifier`s
Benchmarks
=========
Run benchmarks:
| Develop | D13902 | This patch |
| --- | --- | --- |
| Current Rss usage [kb]: 40700 | Current Rss usage [kb]: 38484 | Current Rss usage [kb]: 38208 |
| Peak Rss usage [kb]: 40700 | Peak Rss usage [kb]: 38484 | Peak Rss usage [kb]: 38208 |
| Rss growth [kb]: 15920 | Rss growth [kb]: 13660 | Rss growth [kb]: 12708 |
| Rss growth per entity [byte]: 3260| Rss growth per entity [byte]: 2797 | Rss growth per entity [byte]: 2602 |
| Rss without db [kb]: 29736 | Rss without db [kb]: 29504 | Rss without db [kb]: 29208 |
| 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]: 8824 |
| 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: 9.8215 |
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: 317 |
| Total pages: 760 | Total pages: 607 | Total pages: 609 |
| Used size: 1425408 | Used size: 1208320 | Used size: 1196032 |
| 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: 962560 |
| Main store on disk: 3112960 | Main store on disk: 2486272| Main store on disk: 2494464 |
| Total on disk: 3293184 | Total on disk: 2666496| Total on disk: 2674688 |
| Used size amplification: 1.66339 | Used size amplification: 1.71913| Used size amplification: 1.70165 |
| Write amplification: 3.63268 | Write amplification: 3.53733| Write amplification: 3.54899 |
Note: pages has increased and I'm not sure why (maybe the benchmark ran more samples?)
Like above, disk space has also increased