Commit Graph

11 Commits

Author SHA1 Message Date
Martchus 68d67f543f Refactor to optimize deserialization of base-data
* Break backwards compatibility
* Allow to deserialize only base-data of packages and build
  actions to potentially speed up showing tables
* Speed up package search in many cases by only deserializing
  base-data (unless details are actually wanted)
2022-05-31 19:04:57 +02:00
Martchus 7ade757c8d Avoid locking whole config when updating DBs
* Only lock the config for writing the reloading the config file
* Make sure all write operations to the database acquire an "update mutex"
  to ensure only one write operation happens at a time
* Do *not* acquire any additional locks when reading from a database as it
  should be safe to do so even when a write operation happens because
    * LMDB read and write transactions can happen at the same time
    * The package cache has its own mutex anyways
    * Write ops to the package cache try to lock the "update mutex" to
      prevent writing "old" data to the cache during updates
* Make "lastUpdate" atomic to avoid locking the config when accessing it
2022-03-05 18:55:52 +01:00
Martchus 557fd1a738 lmdb: Use lmdb to store build actions 2022-02-13 21:04:54 +01:00
Martchus 66f59fecb9 Make storing lib deps more efficient and allow for intermediate reads 2022-01-31 21:32:07 +01:00
Martchus 66d3e7b301 lmdb: Remove unused function 2022-01-26 00:44:07 +01:00
Martchus 45922b47ec lmdb: Allow configuring cache limit 2022-01-26 00:41:53 +01:00
Martchus f088e54c61 lmdb: Use package cache when querying packages for dependencies
* Use package cache when querying packages for dependencies or library
  names
* Avoid manual instantiations of `std::shared_ptr<Package>`
2022-01-21 20:35:43 +01:00
Martchus f73753792c lmdb: Use caching when finding package via ID 2022-01-20 23:33:02 +01:00
Martchus 231571f2d1 lmdb: Generalize caching to be able to use it for other types than packages 2022-01-19 23:33:07 +01:00
Martchus fc32f790fb lmdb: Use namespace and have reflective-rapidjson code in its own header 2022-01-18 22:25:28 +01:00
Martchus 2ffa6629c8 lmdb: Use lmdb to store packages and dependency indices 2022-01-18 21:50:53 +01:00