[Lazarus] KOL-CE function WndProcTransparent not working for Label

Robin Hoo robin.hoo.cn at gmail.com
Wed May 26 16:08:43 CEST 2010


Zitat von Graeme Geldenhuys <graemeg.lists at gmail.com>:

> [...]
>> try MacOsAll.pp (300000 lines) in your egex highlighter
>
> You guys don't listen! :-)
>
> MacOSAll.pp was split some time ago into multiple include files. No
> problems, I checked out an older version which was 10MB in size
> (277,380 lines of text to be exact).

If others want to try: It's in fpc 2.4.0.


> Using jEdit v4.3.1 (which is a Java program and uses regex for
> highlighting) opened that file in under 1 second and syntax
> highlighting was immediately available. Ctrl+End to to jump to the end
> of the file. Again, instantly moved there and instantly the syntax
> highlighting was done!

This is a fake. But a nice one. See below.

> THE SLOWNESS YOU GUYS ARE MENTIONING IS BASED ON AN CRAP IMPLEMENTATION.

Maybe it is hard to implement it fast *and* flexible?


> I don't know what editor you guys used to test syntax highlighting,
> but clearly it was a crap editor. jEdit being a Java program is damn
> fast (imagine that, a Java app being fast.) and extremely efficient
> with LARGE files. So regexp syntax highlighting, implemented
> correctly, does not slow down syntax highlighting!!

Indeed. For a regex highlighter jedit is very fast.
Just replace all (* and *) with { } in macosall.pp.
Then add a (* at the start and jump to the end.
jedit needs only 5 seconds to scan here. That is quite impressing for  
a regex highlighter. OTOH just pressing up key gives 100% cpu and the  
cursor moves very slowly. So I would not say that jedit is "extremely  
efficient with LARGE files". The random access of files is impressing  
though.


Martin, while doing the same in synedit: It seems that after every  
replace the highlighter is started. When doing multiple replaces only  
one start is needed. Maybe this can be improved.


Mattias







More information about the Lazarus mailing list