This paradigm for insertion is bad for performance. Each time we do an insertion by step AFTER already looking up the range, we cause multiple hits to the cache, which whilst better than it was, is still very very slow. I'm happy that you haven't changed this area significantly, so don't feel you need to rewrite it... but this is a case of "slow-by-design" that we will want to start phasing out :)