I've attempted to improve this situation with check-in [7d50138407b6992b], now
on trunk.

Could you please test these changes in your environment and tell us if they
improve the performance for your use case?