On Thu, Mar 19, 2009 at 1:35 AM, Edward K. Ream <[email protected]> wrote:

>> Note how you can find stuff like @python_rule21 in the traceback
>> (which signifies we are doing way too much work).

> directives.  True, recognizing @killcolor is a special case, but it must
> coexist with all the other special cases.

Yes, it can. It means there is just a very fast way of saying "do not
do anything!".

> It's hard to believe that this will be substantially faster.
>
> Unless I am mistaken, the only way to properly implement @killcolor so that
> it truly is fast is to completely disable the association of
> QSyntaxHighlighter with the  body text widget.  I haven't found a way to do
> that, iirc, but you shouldn't trust my memory on this.

Just returning from highlightBlock immediately will certainly be fast
enough (and I think the current implementation should do this?). The
tracebacks I linked indicated this was not happening.

Also, in my work machine that has syntax higlighting disabled (because
Qt is disabled) it's fast enough.

> The present code, slow as it is in some situations, cost me several days of
> work.  As you can see, the code is complex, probably unavoidably so.
> Optimizing the code further will not be easy.  I probably will do nothing
> more on this until Leo 4.6 final is released.

Some common special cases can be optimized for in a rather safe fashion...

-- 
Ville M. Vainio
http://tinyurl.com/vainio

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to