Uploaded image for project: 'VS Code Extension'
  1. VS Code Extension
  2. VSCODEEXT-197

Slow formatting with VSCode Qt Qml extension

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 1.7.0
    • QML/QtQuick support
    • None
    • Qt Qml ext version 1.7.0 + qmlls tag 0.2 on Windows 10
    • Windows

    Description

      With the latest (pre-release) version of the extension, as well as the release version, formatting is often very slow. Formatting a simple file (attached) takes over 21 seconds:

      [Trace - 1:06:11 PM] Received response 'textDocument/formatting - (7)' in 21544ms.
      

      Based on the log (qmllstrace_slow.txt), it looks like this is because the extension indexes the file several times before completing the formatting. If I make an edit, then do nothing and wait for the extension output to stop, and then format, it's very fast (qmllstrace_allow_settling.txt):

      [Trace - 1:13:28 PM] Received response 'textDocument/formatting - (24)' in 2ms.
      

      There is a mention on https://bugreports.qt.io/browse/QTBUG-129432?focusedId=886366&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-886366 which sounds like this problem is fixed, but I'm on the latest version of the extension, with the latest qmlls (according to the "Qt: Check for QML language server update" command, version listed is 0.2) and it's still slow. Is it just that the update hasn't been deployed yet? Or is this a different problem?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtvscodeteam Qt VS Code
            matsjoyce-refeyn Matthew Joyce
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes