example workload that triggers these bottlenecks: mass replace of a character in a large
document
see: https://phabricator.kde.org/D17437
bug report with test case file: https://bugs.kde.org/show_bug.cgi?id=333517
these changes are not sufficient to have it working properly but perf already tells it is much better