Need a speedier replacement
I was working on some code i found a while back which will take HTML keywords and highlight them in Delphi. The problem is, the process takes far too long, i was hoping for the speed similiar to which Frontpage colours at.
If you look at the code here: http://www.vbforums.com/showthread.php?t=346505
I would appreciate if anybody knew a way to edit this code to process the coluring much faster, or better still, if anybody knew a replacement code?
Thanks in advanced
Re: Need a speedier replacement
The best way to speed it up would be to change it to find the start and end markers (using an equivalent of VB's InStr, if available) and colour the whole block that needs to be coloured, rather than reading every character and colouring them individually.
Once you have your start and end markers you can do your Dop check within that range (in the same style).
Also, you may find it faster to store the text into a variable rather than read from the RichEdit every time.
Re: Need a speedier replacement
Thanks Si, i will look into that