texstudio-org / texstudio

TeXstudio is a fully featured LaTeX editor. Our goal is to make writing LaTeX documents as easy and comfortable as possible.
http://www.texstudio.org/
GNU General Public License v3.0
2.79k stars 344 forks source link

The typing within \usepackage is very slow #3818

Open pizdjuk opened 3 weeks ago

pizdjuk commented 3 weeks ago

Environment

TeXstudio: 4.8.0
Qt: Usando Qt Version 5.12.8, compilado con Qt 5.12.8 R
OS: Linux Mint
TeX distribution: Texlive

Actual behaviour

If I edit some package or option name within \usepackage command, every letter takes around 2 seconds.

Expected behavior

Typing is normal

Steps to reproduce

  1. Open some big project (around ten tex-files)
  2. Type \usepackage{
  3. The typing will be immediately slowed

What I tried

I tried do disable autocompletion in Options->Editor and in Options->Autocompleteion, restarting Texstudio every time. Nothing helped.

sunderme commented 3 weeks ago

This is the consequence of txs trying to load all defined packages. As you are using an unclosed argument, all following lines are interpreted as package names and txs tries to load them. To avoid this, use the completer an inser \usepackage{} and then insert the package name.

pizdjuk commented 3 weeks ago

It is slow even if I just edit already defined string like \usepackage{enumitem} And if I edit the option string like \usepackage[shortopts]{enumitem}.

FRuehl commented 3 weeks ago

The option "Auto-recompile on document change" (In preferences/Internal PDF Viewer) enforces a complete reload of the document, if changes in the header section are encountered. Either disable "Auto recompile" or type the complete string \usepackage{...} somewhere in the body section, cut the string, and paste in the header. The bug will hopefully be eliminated, if the bug #3822 is resolved.

pizdjuk commented 3 weeks ago

I never enabled the autorecompile option. And this is actually a regression, I think. Some versions (some month?) ago the were no problem like this. Either I checked some bad option, what is not so probable, because I investigated a problem disabling whatever, or this is a regression.

sunderme commented 1 week ago

without a concrete example, there is nothing I can do about this.