Slow editing inside large string
In this example I made a string of 1000 lines This is a $test, and then typing on line 1000 becomes very slow:

The cpu profiler shows 65% goes to font-lock-fontify-region:

Does anybody know if there is a way to speed up the font locking?
Thanks a lot!
@zonuexe Do you perhaps have an idea how to speed up the font locking in this case? Thanks!
@mallt On my PC 1000 lines is worked fine, but certainly over 2000 lines it was very slow.
I confirmed that javascript-mode does not have this problem.
I can not immediately begin this problem, but I'd like to resolve it.
Ok great, thanks a lot for checking this @zonuexe!
I've been looking into this problem, and it seems setting c-opt-cpp-prefix to nil instead of \\s-*<\\? on this line seems to mitigate the slowdown when editing large strings. This breaks the indentation after the <?php tag however, so it's not a suitable fix.
@zonuexe Do you have any ideas of how to change this variable without causing indentation to break?
Thanks!
@mallt Certainly it seems to be a great solution. I will consider this.