If you look at libsvn_fs_base/bdb/changes-table.c, there's an big inefficiency.
Every time svn_fs_paths_changed() is called, we are reading all of the original
changed-path events out of a single BDB key, then collapsing them into a
canonical list of changes. We do this on *every single* call to the public API
-- what a waste of server CPU!
(By "collapse", I mean walking over the list and looking for delete or replace
events, and then walking over the list *again* for each, to remove events that
were nullified. In a worst case scenario, this tends toward O(n^2) behavior.)
Chatting with kfogel and cmpilato in IRC, they agreed that the canonical
collapsing of events should happen exactly once, and then get stored in BDB that
way. It's not clear when this compression should happen; perhaps in a
post-commit situation, around the same time as deltification?
In any case, this clearly hasn't been a problem in production for anyone, so
I've marked it as low-priority. It's one of those "clean up" things that ought
to get done someday.