Lag when typing

Did you find any problems using this software? Please post here...
w3mbox2
Posts: 8
Joined: 17.11.2023 10:09

Re: Lag when typing

Post by w3mbox2 »

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
Posts: 2245
Joined: 25.08.2021 18:15

Re: Lag when typing

Post by main Alexey »

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).
w3mbox2
Posts: 8
Joined: 17.11.2023 10:09

Re: Lag when typing

Post by w3mbox2 »

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 ?
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: Lag when typing

Post by main Alexey »

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.
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: Lag when typing

Post by main Alexey »

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
Posts: 741
Joined: 11.05.2018 11:02

Re: Lag when typing

Post by mix-7 »

Please give an example of CudaText lags
I don't see any lags
How to reproduce them?
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: Lag when typing

Post by main Alexey »

@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
Post Reply