[Lazarus] Regex and Syntax Highlighting

Graeme Geldenhuys graemeg.lists at gmail.com
Wed May 26 15:24:33 CEST 2010


2010/5/26 Mattias Gärtner :
>
> This is a fake. But a nice one. See below.

I still don't understand why you say it's fake? I see syntax
highlighter code, so it works.



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

Mine took about 1 second, whereas before it was so quick I couldn't
measure it. So 1 second on a 10MB more that good enough for me. And
yes, all code after the initial (* was highlighted as comments - one
color of text.


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

Nope, didn't experience anything like that here. The initial Ctrl+end
after I added (* made the CPU jump to +-75%, and then instantly down
to normal idle behaviour. Moving the cursor up or down made no
difference - cpu around 2-5% as normal and cursor movement was as fast
as any other application. PgUp and PgDn repeatedly made the cpu go to
about 20-30% but that is normal too.  Maybe your computer needs a
reboot. ;-)

Attached is the CPU History graph.

-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot-System Monitor.png
Type: image/png
Size: 12574 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20100526/b92132fc/attachment-0004.png>


More information about the Lazarus mailing list