#346 Slow due to live parsing?

open-fixed
5
2012-03-25
2012-03-19
No

Hi,

after the last update or so, I noticed that editing became sluggish. There seem to be delays when entering text. In the "progress" window, I noticed that a "parsing" task appears during typing, which seems to correlate with the delays I see.

Are you parsing the .tex file after each edit? I mean not just after saving, but after adding just one (or a couple of) characters? This would seem very inefficient. Can I disable it somewhere?

Regards
Jonas

Discussion

  • Jonas Diemer

    Jonas Diemer - 2012-03-19

    Just noticed the "enable automatic parsing" option.

    What are the drawbacks of disabling parsing?

    Could there be an option to only parse after saving the file?

     
  • Matthias Erll

    Matthias Erll - 2012-03-19

    Hi Jonas,

    The parser mainly serves three purposes:
    1. Analyzing the document structure for display in the outline view, and other document elements (e.g. comments)
    2. Finding references, citations, and declared commands
    3. Detecting some parameters for building

    TeXlipse currently parses the entire file in the editor, which has been sufficiently quick for our cases so far. Is the tex file you are editing particularly large?
    When splitting larger documents it into smaller tex files and using the \input command, only each changed file has to be re-parsed. TeXlipse traces \input and \include commands, so the outline view still works.
    If this is not the case, we should analyze this further. In some cases, certain constructs in the tex code have lead the parser to excessive use of resources.

    Disabling the "automatic parsing" feature, as you mentioned, has no major disadvantages. The parser still runs before each build (i.e. after saving the file). You can also manually start it clicking the "Update" button in the outline view.
    If you are annoyed by the frequency of the paring process, you can also increase the "Delay" up to 30 seconds, which is counted from when you stop modifying the text.

    Kind regards,
    Matthias

     
  • Jonas Diemer

    Jonas Diemer - 2012-03-20

    The tex file is around 1300 lines, so not particularly large, but not small either. I'd rather not split it up, as I collaborate on this document with others.

    I think I will just keep the parsing disabled, parsing after save is sufficient (I hit ctrl+s quite frequently).

    Maybe you should rename this option to "Parse during typing (without saving)" or something to highlight that documents always get parsed after saving.

     
  • Boris von Loesch

    The parsing itself is not the problem. This is done in background with really low priority and should not influence the UI responsiveness. The problem is that after the parsing run we update the outline page and some other components. This must be done in the UI thread. Especially the rebuilding of the outline and full latex outline can be time consuming if they are getting large. I have committed a patch which rebuilds the outline in a smarter way, which is a lot faster and should fix this bug.

    @Jonas: Can you please try, whether this works for you?

     
  • Boris von Loesch

    • assigned_to: nobody --> borisvl
     
  • Boris von Loesch

    • status: open --> open-fixed
     

Log in to post a comment.