[Eric] Pygments Qscintilla lexer optimisation
Andrei Kopats
hlamer at tut.by
Tue Jan 10 07:48:14 GMT 2012
Hi,
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
pygments styles.
https://github.com/hlamer/mksv3/blob/scheme/mks/plugins/lexerpygments.py
Andrei Kopats
http://hlamer.github.com/mksv3/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/eric/attachments/20120110/ef944a11/attachment.html>
More information about the Eric
mailing list