Very slow editing of \newcommand and \input

TXS - Help
2013-06-01
2013-06-04
  • Otto Debals
    Otto Debals
    2013-06-01

    Dear,

    As I am finishing a master's thesis, my project is becoming quite large.
    During development however, I noticed an increasing delay of TeXStudio when editing \newcommand and \input.

    More specifically, at this point, when using \newcommand or inserting/removing/... characters in a text line already containing \newcommand, TeXStudio processes every change with a delay of 2s, and buffers the changes also to output them all at once, for example after 5s.

    For \input, the same is happening when using \input or instering/removing/... characters in a text line already containing \input. The higher up the hierarchy, the higher the delay. In my main file for example, when commenting out some \input's together, TeXStudio is hanging at that very instance for 15s.

    The project is well structured, with hierarchy up to max four levels (main .tex - chapters .tex's - sections .tex's - sometimes subsection .tex's) and .tex files are not large. There are ca. 350 new commands defined. The document is about 150 pages long. I am using pdflatex, but as being said the delay is about the editing, not the compiling.

    I assume the delay is because of some processing TeXStudio does for structure/auto-completion/... everytime \input or \newcommand is used. As I experience the delay only in the large thesis and not in other small documents, providing a minimal example is quite worthless.

    Two main questions: 1) what is TeXStudio processing when using \input and \newcommand; and 2) are these TeXStudio features which can be turned off / are these features of the used packages / is this normal behavior ?

    Kind regards

     
    • When changing a input, txs needs to reapply the syntax checking as well
      as ref/label checking.
      The same applies with newcommands though here only syntax checing is done.
      You probably can avoid this, if you disable syntax/ref checking.
      Apart from that, what kind of computer are you using ? Both operations
      actually should be quite fast or non-blocking.
      Could you provide the files that we can check the issue in more detail
      here ?

      Jan

      On 01.06.2013 09:54, Otto Debals wrote:

      Dear,

      As I am finishing a master's thesis, my project is becoming quite large.
      During development however, I noticed an increasing delay of TeXStudio
      when editing \newcommand and \input.

      More specifically, at this point, when using \newcommand or
      inserting/removing/... characters in a text line already containing
      \newcommand, TeXStudio processes every change with a delay of 2s, and
      buffers the changes also to output them all at once, for example after 5s.

      For \input, the same is happening when using \input or
      instering/removing/... characters in a text line already containing
      \input. The higher up the hierarchy, the higher the delay. In my main
      file for example, when commenting out some \input's together, TeXStudio
      is hanging at that very instance for 15s.

      The project is well structured, with hierarchy up to max four levels
      (main .tex - chapters .tex's - sections .tex's - sometimes subsection
      .tex's) and .tex files are not large. There are ca. 350 new commands
      defined. The document is about 150 pages long. I am using pdflatex, but
      as being said the delay is about the editing, not the compiling.

      I assume the delay is because of some processing TeXStudio does for
      structure/auto-completion/... everytime \input or \newcommand is used.
      As I experience the delay only in the large thesis and not in other
      small documents, providing a minimal example is quite worthless.

      Two main questions: 1) what is TeXStudio processing when using \input
      and \newcommand; and 2) are these TeXStudio features which can be turned
      off / are these features of the used packages / is this normal behavior ?

      Kind regards


      Very slow editing of \newcommand and \input
      https://sourceforge.net/p/texstudio/discussion/907840/thread/a0807f56/?limit=25#760e


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/texstudio/discussion/907840/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • Otto Debals
    Otto Debals
    2013-06-02

    Hi Jan,

    Thanks for the reply. I'm using an ASUS Zenbook, Windows 7, i7, 4GB, TeXStudio 2.5.2.
    I've just noticed the problems appear if the main.tex file is used as the master document, so it must be the ref/... checking indeed.

    If you are referring to my files, do you want them all? Compilable?

    I must say: I'm using references from within figure captions to plots within tikzpictures (which are also included with \input), so to have a legend inside the caption. There are quite a few pictures, each with quite some datapoints. So if TeXStudio is really crosschecking everything for every change done to \newcommand and \input, that can be the reason. I'm going to try to turn the checking off.

    Otto

     
  • Could you provide the document ? Because i am really interested to see where the performance issues arise ...

     
  • Otto Debals
    Otto Debals
    2013-06-04

    Hi Jan,

    Apologies for the delay.
    The deadline for the master's thesis is Friday, so that explains much ;-)

    I'll send you everything via mail. As being said: the problems reduce substantially if the main file is not selected as master file. Additionally, opening TeXStudio also takes quite some time with not many files default open.

    Otto