B+ syntaxHighlighting commands slows down the file loading....

BlitzPlus Forums/BlitzPlus Programming/B+ syntaxHighlighting commands slows down the file loading....

Red(Posted 2003) [#1]
syntaxhighlight fully functional :
1300 lines -> 3.1 s

syntaxhighlight (full code but ignore textarea formating commands)
1300 lines -> 0.17 s


skn3(Posted 2003) [#2]
You need to optimize it then...

EG, only format the screen you can see. Then when you scroll, update the new lines that appear.


Red(Posted 2003) [#3]
But there is not list of eventDATA for textarea.
How to detect a scrolling


Red(Posted 2003) [#4]
Ive tested eventdata() for textarea
and it returns only one value in this case. (=1)

There's no eventdata to detect text scrolling


Wiebo(Posted 2003) [#5]
Capture the keys and the mouse controls that can cause scrolling and work from there.


Zster(Posted 2003) [#6]
Or scroll using a slider and capture that event.


ShadowTurtle(Posted 2003) [#7]
http://www.blitzbasic.com/codearcs/codearcs.php?code=691
^ that is fast syntax highlighting.

When you load:
you copy the file in the copy-memory. Than paste this in the textarea.

cu, ST.