[Eric] Pygments Qscintilla lexer optimisation
hlamer at tut.by
Tue Jan 10 07:48:14 GMT 2012
I needed pygments QScintilla lexer for my project, and found your
LexerPygments implementation. The problem with it is that is is really
slow. For me, 10 % CPU load in idle, and 100% whey actively typing (tested
on Eric4 on Scheme source file)
Profer gave amazing results, parsing source with pygments and highlighting
is is really quick, 0.1 ms for my test source file, but, you detect file
language with pygments on every iteration, and it takes 182 ms. If I don't
detect language every time, highlighting is really quick.
If you would like, you may check my implementation. Probably, you'll find
some other useful improvements, such as using QsciLexerCustom, or native
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Eric