]> dgit.raspbian.org Git - git-annex.git/commit
dynamically disable filter-process in restagePointerFile when it would be slower
authorJoey Hess <joeyh@joeyh.name>
Mon, 8 Nov 2021 19:55:27 +0000 (15:55 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 8 Nov 2021 20:20:34 +0000 (16:20 -0400)
commita0758bdd1002e798f62353efa725ac2972589b96
tree2dff2b9e52d09ed716bb1514cc7084383f2e2190
parent054c803f8d7cc43eb01fdf6141ab6572373c7d60
dynamically disable filter-process in restagePointerFile when it would be slower

Based on my earlier benchmark, I have a rough cost model for how
expensive it is for git-annex smudge to be run on a file, vs
how expensive it is for a gigabyte of a file's content to be read and
piped through to filter-process.

So, using that cost model, it can decide if using filter-process will
be more or less expensive than running the smudge filter on the files to
be restaged.

It turned out to be *really* annoying to temporarily disable
filter-process. I did find a way, but urk, this is horrible. Notice
that, if it's interrupted with it disabled, it will remain disabled
until the next time restagePointerFile runs. Which could be some time
later. If the user runs `git add` or `git checkout` on a lot of small
files before that, they will see slower than expected performance.

(This commit also deletes where I wrote down the benchmark results
earlier.)

Sponsored-by: Noam Kremen on Patreon
Annex/Link.hs
Annex/Queue.hs
Git/Config.hs
Git/Queue.hs
doc/todo/git_smudge_clean_interface_suboptiomal.mdwn
doc/todo/v9_changes.mdwn