Instead of determining which working copies are affected while applying the commit queue, do this while creating the queue by actually creating a queue per working copy.
This allows performing a working copy commit in a future step.
I expected a slight performance slowdown in this step, but it appears things already get slightly faster than before, most likely just caused by using pre sorted items.
* subversion/libsvn_wc/adm_ops.c (svn_wc_committed_queue_t): Add member. (svn_wc_committed_queue_create): Initialize new mapping. (svn_wc_queue_committed4): Determine which working copy is affected here. (compare_queue_items): New function. (svn_wc_process_committed_queue2): Use two loops to avoid wcroot work.