Thanks, I reproduced the problem and yes, it is wayyy too slow. Also, the code in question has some FIXMEs that have not been fixed. Since we're trying to push out a new release, at this point we should probably revert the relevant change and think about how to do this sort of thing in a better way in a later release. Proposed patch attached.