Zitat von Graeme Geldenhuys <[email protected]>:

[...]
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




--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to