8bde6101e3
importfeed: Use caching database to avoid needing to list urls on every run, and avoid using too much memory. Benchmarking in my podcasts repo, importfeed got 1.42 seconds faster, and memory use dropped from 203000k to 59408k. Database.ImportFeed is Database.ContentIdentifier with the serial number filed off. There is a bit of code duplication I would like to avoid, particularly recordAnnexBranchTree, and getAnnexBranchTree. But these use the persistent sqlite tables, so despite the code being the same, they cannot be factored out. Since this database includes the contentidentifier metadata, it will be slightly redundant if a sqlite database is ever added for metadata. I did consider making such a generic database and using it for this. But, that would then need importfeed to update both the url database and the metadata database, which is twice as much work diffing the git-annex branch trees. Or would entagle updating two databases in a complex way. So instead it seems better to optimise the database that importfeed needs, and if the metadata database is used by another command, use a little more disk space and do a little bit of redundant work to update it. Sponsored-by: unqueued on Patreon |
||
---|---|---|
.. | ||
adjusted_branches | ||
assistant | ||
balanced_preferred_content | ||
encryption | ||
exporting_trees_to_special_remotes | ||
external_backend_protocol | ||
external_special_remote_protocol | ||
git-remote-daemon | ||
iabackup | ||
metadata | ||
new_repo_versions | ||
p2p_protocol | ||
requests_routing | ||
adjusted_branches.mdwn | ||
assistant.mdwn | ||
balanced_preferred_content.mdwn | ||
caching_database.mdwn | ||
encryption.mdwn | ||
exporting_trees_to_special_remotes.mdwn | ||
external_backend_protocol.mdwn | ||
external_special_remote_protocol.mdwn | ||
gcrypt.mdwn | ||
git-remote-daemon.mdwn | ||
iabackup.mdwn | ||
importing_trees_from_special_remotes.mdwn | ||
metadata.mdwn | ||
new_repo_versions.mdwn | ||
p2p_protocol.mdwn | ||
preferred_content.mdwn | ||
requests_routing.mdwn | ||
roadmap.mdwn |