main Alexey wrote: ↑17.11.2023 14:43
to detect that lexer is the 'reason for slowliness', turn off the lexer (statusbar click). compare the speed when none lexer is active: statusbar shows '(none)' .
I can confirm that disabling the Java lexer did speed up things a lot in the old Windows XP computer. CudaText becomes very responsive. The source code file has only 2000 lines.
I hope that this observation can help you optimize CudaText in the future.
main Alexey wrote: ↑17.11.2023 15:17
you can create the 'lite lexer' for Java.
https://wiki.freepascal.org/CudaText#Lite_lexers
this way speed will be good and syntax-coloring will be partly ok (without multi-line comments).
Other editors like Notepad++ and Geany do not have this problem. Maybe an opportunity to optimize CudaText ?
i would like to do it. first I need to see the lag. I don't see it on Java lexer! I got 1700-lines java file, I hold a key in the beginning of the file, or at the end - no lag at all for me.
my CPU: Intel Core i3 3GHz.
i am not sure here, but:
try to change the option "renderer_anti_flicker" to 15...40.
not sure it can help here, but try it.
Specifies the delay to reduce flickering on editing. [has suffix]
Value 0: feature is disabled.
Value 1...999: it's timer delay in milliseconds. 15...40 seems OK for slow systems.
Value 1000: use special anti-flickering code, works better on some systems.
@mix-7
We should ask what CPU user has. after that, we must use that CPU (and maybe Windows XP? no, windows 10 is OK) and test 1000-lines Java file with Java lexer.
example of file: https://github.com/Alexey-T/lexer_tests ... eting.java