Page 1 of 2
Lag when typing
Posted: 17.11.2023 10:18
by w3mbox2
I compared the typing latency/lag of CudaText, Notepad++ and Geany on two computers (one old/slow and the other modern/fast) with Windows operating systems and I noticed that CudaText is very slow compared to the other two editors.
This is the main issue that is preventing me from switching to CudaText from Notepad++ and Geany.
Is there a configuration/setting that can be adjusted to make CudaText more responsive to typing ?
This happens even when autocomplete is disabled. Notepad++ (Windows only) and Geany (cross-platform) are both very responsive even with auto-complete enabled.
Thank you for your feedback.
Re: Lag when typing
Posted: 17.11.2023 10:22
by main Alexey
no, no such setting exist.
Cud's reaction is slower, I know.
Re: Lag when typing
Posted: 17.11.2023 10:33
by main Alexey
I use PC made NN years ago. the typing in Pascal lexer is rather fast, on 8000-lines file. this speed can be slow on very big files, or if you use some 'slow' plugin (like auto-completion plugin / LSP).
so remove all auto-completion plugins (and any interactive plugins like Markdown Editing) and try again.
Re: Lag when typing
Posted: 17.11.2023 11:07
by w3mbox2
The old computer has Windows XP installed and when starting Cudatext the attached error shows up. It translates to "could not find entry point of DeleteProcThreadAttributeList in KERNEL32.dll".
If the error is acknowledged by clicking OK, Cudatext starts normally but the following warning shows up in the bottom panel:
NOTE: No Python 3 engine found. Python plugins don't work now. To fix this:
place near cudatext.exe: python3x.dll, python3x.zip, python3xdlls\*.pyd, MS VS Runtime.
Can these help explain the typing lag in the Windows XP computer ?
Thank you again for your feedback.
Re: Lag when typing
Posted: 17.11.2023 11:57
by main Alexey
>Can these help explain the typing lag in the Windows XP computer ?
no, it cannot, this error-msg is different thing. I will search for this API in FreePascal , why it is used. but lag is a different thing.
Re: Lag when typing
Posted: 17.11.2023 12:02
by main Alexey
this API function is used by Python 3.8 DLL.
you must use Python 3.4 anyway.
https://wiki.freepascal.org/CudaText#Py ... Windows_XP
so, you have Python disabled, but you see a lag. so no plugins are involved. maybe you mean the very small lag, which exists of course.
Re: Lag when typing
Posted: 17.11.2023 13:12
by w3mbox2
I investigated further the lag issue in the Windows XP computer.
All editors CudaText, Notepad++ and Geany see a somewhat high CPU usage when I press any key for several seconds. But while CudaText stops adding new characters after the first two or three, Notepad++ and Geany remain responsive adding new characters without any lag.
Auto-completion is enabled on all editors.
I find that optimizing these lag issues on a very old computer is always a very good exercise in optimization since it is in the old computer that the results of the optimization are more visible.
Is there any chance that the typing lag issue in CudaText will see an improvement in the future ?
Thank you again for your collaboration and prompt feedback.
Re: Lag when typing
Posted: 17.11.2023 14:34
by mix-7
w3mbox2 wrote: ↑17.11.2023 13:12
All editors CudaText, Notepad++ and Geany see a somewhat high CPU usage when I press any key for several seconds. But while CudaText stops adding new characters after the first two or three, Notepad++ and Geany remain responsive adding new characters without any lag.
main Alexey wrote: ↑17.11.2023 10:22
Cud's reaction is slower, I know.
How does this delay manifest itself?
I didn't notice any delays when entering text in CudaText in Ubuntu
Re: Lag when typing
Posted: 17.11.2023 14:36
by main Alexey
>any chance that the typing lag issue in CudaText will see an improvement in the future ?
maybe, I don't know yet.
what can be slow for you is the lexer (you mentioned Java lexer).
you can make the 'lite lexer' for your syntax
https://wiki.freepascal.org/CudaText#Lite_lexers
to replace (partially) the normal lexer. this will speedup the work.
Re: Lag when typing
Posted: 17.11.2023 14:43
by main Alexey
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)' .