Lag on text input on MacOS [Laz issue, partially solved]

Solved bugs are moved into this topic...
uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

Updated beta 1.137.2:
for macOS too,
http://www.uvviewsoft.com/c/
tonydunn
Posts: 15
Joined: 02.07.2021 15:10

Post by tonydunn »

With my existing user.json, with bracket_highlight and lexer_dynamic_hilite both turned off, and starting a new HTML file from a template, the lag is gone, or so it seemed when I tried it first. I loaded up an existing HTML file and tried typing in the <body> and the lag was back. The file I was working on has a few calls in the head to scripts and a style sheet, like:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstr ... ap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/j ... "></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ ... "></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstr ... "></script>

That is the only real difference between the template-created file and my own HTML, but the difference was clear. I don't think it could possibly make any difference, but I report it just for completeness.

Stripped my user.json back to nothing at all (so I am guessing that Cuda falls back on the defaults) and created an HTML file from template, expecting acceptable performance as bracket_highlight and lexer_dynamic_hilite are off by default, but surprisingly, the lag was *much* worse, as bad as it has ever been.

When I mentioned about the body tags highlighting on and off, I knew what the feature _was_, but I was trying to say that the tag was on, then off, as I typed, for no *particular* reason I could see, when I was typing before the closing tag. If I am between the tags, then they should be on (if the feature is activated) I thought, but they changed as I typed, not staying on when I was between the opening and closing tags, as I expected. Is that assumption wrong?

As for the console panel, that was an issue with the Markdown preview plugin wanting the 'R' lexer, which has not been installed by the multiple installer I guess when the Markdown Preview plugin was added by me. I deleted all the plugins when trying to get to the bottom of the problem, and re-installed CudaText clean, so I can't as things stand now, re-create that for you.

In summary, with bracket_highlight off, and lexer_dynamic_hilite off, I am still seeing significant lag in certain cases with HTML files, on Mac. Linux with an identical user.json is fine, but I noticed today that I am on 1.136.0.1 on Linux, but 1.137 on Mac, but the problems with lag were the same on the earlier version on Mac, and have never been an issue on Linux.

Anything else I could submit for information?

Thanks to all for patience with this one, and for your time/thoughts.
uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

I may blame plugins. you have 12 additional plugins (on screenshot). so can you try on clean Cud? on Mac you cannot make 2nd install - all installs share the same settings-dir. can you remove all user-plugins?
https://wiki.freepascal.org/CudaText#Lo ... .27data.27
Shovel
Posts: 141
Joined: 31.12.2019 10:16

Post by Shovel »

I wanted to see if the lag is present when you disable lexer for html file, and restart CudaText, then switch lexer to html, from your messages I'm not sure you tried that.

Also it might be helpful if you checked for lag with empty user.json and without any plugins (temporarily rename 'py' folder in CudaText directory)

And maybe see if disabling some lexer styles ("Options > Lexers > Lexer properties... > Styles") might get rid of the lag
uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

>As for the console panel, that was an issue with the Markdown preview plugin wanting the 'R' lexer,

Seems it was "R_Markdown" lexer. I just fixed the addons-registry so R_Markdown now wants the "R" lexer.
uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

About dynamic highlight - stored the issue here https://github.com/Alexey-T/CudaText/issues/3508
Need to repro this first.
tonydunn
Posts: 15
Joined: 02.07.2021 15:10

Post by tonydunn »

@uvviewsoft said:

> I may blame plugins. you have 12 additional plugins (on screenshot). so can you try on clean Cud? on Mac you cannot make 2nd install - all installs share the same settings-dir. can you remove all user-plugins?

I thought I said: I removed the existing installation completely and re-installed. It made no difference. Current installation is 100% vanilla, only plugins that ship with Cuda are installed. See screenshot. Still the same problem.
My startup stats as of now, no plugins being loaded
My startup stats as of now, no plugins being loaded
@Shovel: I did try as you suggested, and I said in message that it worked if I disabled the HTML lexer, then restart, but as soon as I revert to HTML lexer, the lag is back. As for empty user.json, yes, I have already tried that (see earlier messages), makes no positive difference, and incredibly, it seemed worse if anything! I had not thought of disabling individual styles in the lexer, but having to work through them one-by-one trying to eliminate which one it might be would be a nightmare, and I just don't have the time or commitment.

Cheers everyone for suggestions. I think for now I'll use some other editor for HTML, and Cuda for non-HTML work.
uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

So we have some (it seems Lazarus) bug which prevents fast work with HTML lexer.
uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

About this report-

>When I mentioned about the body tags highlighting on and off, I knew what the feature was, but I was trying to say that the tag was on, then off, as I typed, for no particular reason I could see, when I was typing before the closing tag. If I am between the tags, then they should be on (if the feature is activated) I thought, but they changed as I typed, not staying on when I was between the opening and closing tags, as I expected.

I cannot see this on latest Cud ( macOS beta http://www.uvviewsoft.com/c/ ). AFAIR I saw that before my fix, now I don't.
uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

>Session has four files, namely an index.html, a Markdown file, and two plain text files, all of which are very small in size

can you please tell, is another complex lexer has slow work too, besides HTML? For example, this C++ file - it's slow too?
https://raw.githubusercontent.com/arvid ... io_job.cpp
and this Python file:
https://raw.githubusercontent.com/halfb ... dcrumbs.py
Post Reply