In svn 1.2, libsvn_fs_fs had it's auto-merging algorithm changed to avoid expensive predecessor walks. See revisions 13222, 13223, 13232. This logic needs to be ported to libsvn_fs_base as well. This issue should be marked with a "performance" keyword. Specifically, it will make things more efficient when a new HEAD revision comes in during a commit that's the process of finalization. It doesn't happen very often, but when it does, the current auto-merging algorithm is very expensive.