Is it possible to apply callbacks only to filtered commits?
When filtering by paths (either given from command line or file) with use of blob callbacks, looks like filter-repo applies callbacks to all commits, as result performance degrade. Is it possible to apply blob/message/other applicable callbacks only to selected commits? Now I have to use more than one pass: the first one for paths, and other ones for callbacks. Let's filter-repo work in multiple passes itself.
I suspect the problem here is not callbacks in general, but blob callbacks. filter-repo is much faster when nothing needs blobs, because it can just ignore all files entirely, instead just working on the commit and tree objects. If you need any blobs at all, then it can't pass the global --no-data flag to fast-export, and then fast-export has to process all blobs and provides them all, then filter-repo has to process them all, and then fast-import has to process them all.
However, if performance is a concern, you could lift some ideas from contrib/filter-repo-demos/lint-history; it only used a commit callback to bypass the need to load files, and then manually loaded file contents on its own using a git cat-file --batch subprocesses. See the lint_with_real_filenames() function.
I'll assume the alternative in my second paragraph above suited your needs and close this one out; no need to continue leaving this issue open.