[Eric] Pygments Qscintilla lexer optimisation

Alan Ezust alan.ezust at gmail.com
Tue Jul 8 20:21:55 BST 2014


Oops, I found it in QScintilla sourcecode. I hit the post button too soon.



On Tue, Jul 8, 2014 at 11:43 AM, Alan Ezust <alan.ezust at gmail.com> wrote:

> I was googling for a Pygment lexer for Scintilla and came across this
> message. But none of the links work anymore. And I can't find any
> LexerPygments in the qscintilla, pygments, eric4 or eric5 source code.
> What I did find is this:
>
> https://code.google.com/p/codimension/source/browse/trunk/src/editor/lexer/lexerpygments.py?spec=svn1598&r=1598
>
> but I don't know whether this is the one you are talking about or a
> completely different one.
>
> Where is LexerPygments.py now?
>
>
>
> On Tue, Jan 10, 2012 at 10:15 AM, Detlev Offenbach <
> detlev at die-offenbachs.de> wrote:
>
>> 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
>> _______________________________________________
>> Eric mailing list
>> Eric at riverbankcomputing.com
>> http://www.riverbankcomputing.com/mailman/listinfo/eric
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/eric/attachments/20140708/2835c330/attachment.html>


More information about the Eric mailing list