Cudatext: Very slow work with 130 carets and editing a word across a file, 2k lines, with lexer

Created on 30 Mar 2021  路  11Comments  路  Source: Alexey-T/CudaText

Related to #3274.

Excellent!!! I cannot see anymore the "issue" in #3274

Question Alex, basically I use the T-SQL lexer for my Store Procedures, most of them has 2K+ lines. If I want to use multi-caret editing with this last feature, CudaText become unusable/frozen, but is related to the Lexer because If I change to SQL^ all goes smoothly. I don't know if the "freezing" is because CudaText repaints each change, do you think is possible to do something when someone is editing multi-carets and using non-lite-lexers?

All 11 comments

I use mul-carets all the time, so I cannot see repro-- pls, some video?
do you see 'frozen' only on 2K lines? or even on 100 lines?

is it new issue of 1.129.x?

Tested with the next script and T-SQL lexer:
SQLSkillsTest.zip

Used with no permission :) from:
https://www.sqlskills.com/blogs/paul/new-script-how-much-of-the-database-has-changed-since-the-last-full-backup/

The idea was replicate a file with 2K lines and trying to edit around 100 carets:
MultiCaretNonLiteLexer

The "issue" is old previous the release of #3274.
In the past I changed the multi-editing with the Replacing option for this same reason (The freezing), thinking it was related to #3084, but as you started with this new implementation, I took advantage of the new beta to test again.

hm, I don't get idea what you do on this video... where are mul-carets?

I select all DECLARE words with Find/Select All

now I understood. Yes, I confirm the slow work with 130 carets in this file.

Jairo, special beta with experement. its not 100% solved but may be faster.
tell me how it's faster?
I see some freeze is here but it's faster in editing 130 carets in that sql.
http://uvviewsoft.com/c/cudatext-win-x64-1.129.8.tst.zip

adding a thread to parser is TODO for future.

No Alex,

I can see less freezing, but after typing many chars (more than 15) CudaText fall again. I really don't know as you said the problem is the lexer or the re-painting of the lexer with each letter that you type, I imagine if CudaText could stops re-paiting until the user cancels all carets, maybe is just a no sense idea.

If you think that putting the lexer parser in a new thread could nip the problem in the bud, no problem the feature can wait, currently I am using replace function instead multi-caret edition.

my bad, bad tested. now beta updated! much better now?
http://uvviewsoft.com/c/cudatext-win-x64-1.129.8.tst.zip

problem was NOT in the lexers. too many parser calls.

Wow!!! Excellent, the current behavior is more than enough!!! I am totally agreed with this released version.

yes. let's test it for 1-2 days. may have bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rhinolophus picture rhinolophus  路  5Comments

Alexey-T picture Alexey-T  路  7Comments

junguler picture junguler  路  5Comments

Alexey-T picture Alexey-T  路  5Comments

xcme picture xcme  路  5Comments