remove supportUnlocked check that is not worth its overhead
authorJoey Hess <joeyh@joeyh.name>
Tue, 15 Jun 2021 13:24:59 +0000 (09:24 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 15 Jun 2021 13:28:56 +0000 (09:28 -0400)
commite147ae07f4841180d420f20ce453a6cb85d8c4e2
treed5ebbe7c3a44adab098e23b930f009ca9dcdeb7a
parent6099edbf1c2f6163b5f4edbaa60f74b0bb2d863d
remove supportUnlocked check that is not worth its overhead

moveAnnex only gets to that check if the object file was not present
before. So in the case where dup files are being added repeatedly,
it will only run the first time, and so there's no significant speedup
from doing it; all it avoids is a single sqlite lookup. Since MVar
accesses do have overhead, it's better to optimise for the common case,
where unlocked files are supported.

removeAnnex is less clear cut, but I think mostly is skipped running on
keys when the object has already been dropped, so similar reasoning
applies.
Annex/Content.hs
doc/bugs/significant_performance_regression_impacting_datal/comment_33_6e5121e066998a303cf68ebc53e9fc15._comment [new file with mode: 0644]