use insert_ for speed improvement
persistent-2.14.4.1 makes insert_ faster than insert because it skips getting the key back. Sponsored-by: Dartmouth College's DANDI project
This commit is contained in:
parent
aa041596f5
commit
cf892f4256
2 changed files with 19 additions and 1 deletions
|
@ -93,7 +93,7 @@ addAssociatedFile k f = queueDb $
|
||||||
-- any old key.
|
-- any old key.
|
||||||
newAssociatedFile :: Key -> TopFilePath -> WriteHandle -> IO ()
|
newAssociatedFile :: Key -> TopFilePath -> WriteHandle -> IO ()
|
||||||
newAssociatedFile k f = queueDb $
|
newAssociatedFile k f = queueDb $
|
||||||
void $ insert $ Associated k af
|
insert_ $ Associated k af
|
||||||
where
|
where
|
||||||
af = SFilePath (getTopFilePath f)
|
af = SFilePath (getTopFilePath f)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="joey"
|
||||||
|
subject="""comment 17"""
|
||||||
|
date="2022-12-26T19:10:04Z"
|
||||||
|
content="""
|
||||||
|
<https://github.com/yesodweb/persistent/issues/1441> got fixed in
|
||||||
|
persistent-2.14.4.1. git-annex will get that speed improvement when it's
|
||||||
|
built with that version. I'd anticipate it improving from 19 seconds
|
||||||
|
to around 16 seconds.
|
||||||
|
|
||||||
|
(I further opened <https://github.com/yesodweb/persistent/issues/1457>
|
||||||
|
that would speed up some other parts of git-annex if implemented.)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
The only reason to leave this bug open is that reconcileStaged is still
|
||||||
|
somehow slower than only the persistent-sqlite overhead can explain.
|
||||||
|
"""]]
|
Loading…
Reference in a new issue