I'll fix the remaining issues by myself. I've concentrated on the stuff that needs to go into kate for now (the rangesForLine speedup for example), since those _must_ be done before 4.5 release. With that fix, it doesn't feel sluggish any more.