The main problem is a perceptible latency between typing and seeing the colors update. When you type, un-styled characters appear in the editor, then flick into the correct style an instant later. The editor remains usable, but it doesn't feel as quick & responsive as it should. (Also, I ran the parser on the client side; with network I/O in play the latency would get worse.)
If you decide to go down this route, the async styler API that I used still works in Orion 8.0.
Here are the API docs (see the type == "highlighter" case).
Install it, and it will take over syntax highlighting for various file types (.js, etc) so you can see how it performs.
Here's a brief sketch of how the approach works, more
notes here.
The plugin listens to text model deltas using an implementation of the orion.edit.model
service, which it uses to maintain a shadow copy of the text buffer. (This
is more efficient than grabbing the entire text buffer from the editor every time, although for very small files the difference will be minimal.)
Parser runs on the shadow buffer, calculates style info.
Style
info is sent to the editor by having the
orion.edit.highlighter service dispatch a
styleReady event on itself.
- The editor uses the styleReady event data to redraw the affected lines.
Regards
Mark