-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor the caching code and partition cache into sections
The new cache is now backed by xmlb instead of an LMDB database, which allows us to perform a lot more complex queries with low effort. The cache is also now shared between all applications by default (by popular request), for every grouping of metadata. In addition to that, what AsPool understands as "cache" is now a collection of partitions, called sections, which represent AppStream metadata from one domain, e.g. one Flatpak repository, the OS' collection metadata, the combined metainfo/desktop-entry data of the system, etc. This permits updating those sections independently, which means that if a MetaInfo file changes, we will not have to rebuild the whole cache, but only a small section of it. This is a prerequisite for efficient monitoring of metadata directories, and a lot of other neat optimizations. Since AppStream is used in desktop shells nowadays, support for this is a needed addition to not keep the system busy with needless work and cause lag. In addition to that, a lot of cruft and complex code has also been cleaned up. The current code runs about 60% slower than the previous cache on cache rebuilds, query time is about 10% slower. There is a lot of room for improvements though, and we will likely get to the previous times before release. Caution! The new code is not yet fully threadsafe and has various rough edges, but it compiles and passes the testsuite. Further improvements are located in smaller, easier to manage follow-up patches. CC: #337
- Loading branch information
Showing
24 changed files
with
2,405 additions
and
3,520 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.