[Eric] Pygments Qscintilla lexer optimisation

Detlev Offenbach detlev at die-offenbachs.de
Tue Jan 10 18:15:07 GMT 2012


Am Dienstag, 10. Januar 2012, 10:48:14 schrieb Andrei Kopats:
> 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/

Hello Andrei,

I'll check the your variant and will see how to improve my LexerPygments. 
Thanks for the hints.

Regards,
Detlev
-- 
Detlev Offenbach
detlev at die-offenbachs.de


More information about the Eric mailing list