git-annex/Database
Joey Hess 6fbd337e34
avoid uncessary keys db writes; doubled speed!
When running eg git-annex get, for each file it has to read from and
write to the keys database. But it's reading exclusively from one table,
and writing to a different table. So, it is not necessary to flush the
write to the database before reading. This avoids writing the database
once per file, instead it will buffer 1000 changes before writing.

Benchmarking getting 1000 small files from a local origin,
git-annex get now takes 13.62s, down from 22.41s!
git-annex drop now takes 9.07s, down from 18.63s!
Wowowowowowowow!

(It would perhaps have been better if there were separate databases for
the two tables. At least it would have avoided this complexity. Ah well,
this is better than splitting the table in a annex.version upgrade.)

Sponsored-by: Dartmouth College's Datalad project
2022-10-12 15:33:16 -04:00
..
Keys avoid uncessary keys db writes; doubled speed! 2022-10-12 15:33:16 -04:00
Benchmark.hs eliminate single/multi writer distinction 2021-10-20 12:26:30 -04:00
ContentIdentifier.hs add annex.dbdir (WIP) 2022-08-11 16:58:53 -04:00
Export.hs add annex.dbdir (WIP) 2022-08-11 16:58:53 -04:00
Fsck.hs add annex.dbdir (WIP) 2022-08-11 16:58:53 -04:00
Handle.hs init: probe if sqlite works 2022-08-17 13:12:26 -04:00
Init.hs use a subdirectory of annex.dbdir 2022-08-12 13:18:15 -04:00
Keys.hs avoid uncessary keys db writes; doubled speed! 2022-10-12 15:33:16 -04:00
Queue.hs fix MVar deadlock when sqlite commit fails 2022-06-06 12:16:55 -04:00
Types.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00