queue more changes to keys db

Increasing the size of the queue 10x makes git-annex init 7% faster in a
repository with 86000 annexed files.

The memory use goes up, from 70876 kb to 85376 kb.
This commit is contained in:
Joey Hess 2022-11-18 13:29:34 -04:00
parent 8fcee4ac9d
commit c834d2025a
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 11 additions and 5 deletions

View file

@ -73,8 +73,8 @@ newtype WriteHandle = WriteHandle H.DbQueue
queueDb :: SqlPersistM () -> WriteHandle -> IO ()
queueDb a (WriteHandle h) = H.queueDb h checkcommit a
where
-- commit queue after 1000 changes
checkcommit sz _lastcommittime = pure (sz > 1000)
-- commit queue after 10000 changes
checkcommit sz _lastcommittime = pure (sz > 10000)
-- Insert the associated file.
-- When the file was associated with a different key before,