[[!comment format=mdwn
 username="joey"
 subject="""comment 5"""
 date="2019-09-20T16:51:56Z"
 content="""
This is not to say that the idea of having a longer-running git-annex
process that responds to all git's smudge/clean is a bad idea. Each new
invokation of git-annex has to re-open databases, start up git cat-file
to query from, link the executable, read git config, etc. That takes a
few hundred milliseconds.

The best way to get a longer-running git-annex process for smudge/clean
would be to use git's long-running filter process interface. But that
interface currently feeds the entire content of large files through a pipe
to the git-annex process, which *very* innefficient. So git-annex doesn't
use that interface. Improving the interface to let the clean filter read
the content of the file itself, rather than it being piped through,
would be the best way to improve `git add` performance.
[[todo/git_smudge_clean_interface_suboptiomal]] does discuss this.
"""]]
