I have a problem with highlighting function. With larger files (2MB), the markAll takes very long to complete (up to 30 seconds tested) and consume extremely large portions of memory (up to 600MBs tested).
I have thought, maybe, like the syntax parsing, only the shown portion of document should highlight.
I understand this could cause issues with search, but in case of search when listing through found occurences, after you run out of highlights in current screen you search for next one.
I am working on a solution and will provide the sources when finished.