Skip to content

Very slow performance with 'Svelte for VS Code' extension on Sapper projects on networked drives #933

@Runi-c

Description

@Runi-c

After trying the extension on a fresh project & seeing how fast it is, I'd like to reach out for some assistance in figuring out why the language server takes 6-7 seconds on every edit to HTML to begin serving language features again on Sapper projects on a networked drive.

Setting debug trace to "verbose" produces this series of messages when typing the below snippet and expecting IDE features:

slowsvelte.mp4
[Trace - 7:19:58 PM] Sending notification 'textDocument/didChange' ("<").
[Trace - 7:19:58 PM] Sending request 'textDocument/completion - (5)'.
[Trace - 7:19:58 PM] Sending request 'textDocument/signatureHelp - (6)'.
[Trace - 7:19:58 PM] Sending notification 'textDocument/didChange' ("B").
[Trace - 7:19:58 PM] Sending notification '$/cancelRequest' - (6).
[Trace - 7:19:58 PM] Sending request 'textDocument/signatureHelp - (7)'.
[Trace - 7:19:58 PM] Sending request 'textDocument/semanticTokens/full - (8)'.
[Trace - 7:19:58 PM] Sending notification 'textDocument/didChange' ("u").
[Trace - 7:19:58 PM] Sending notification 'textDocument/didChange' ("t").
[Trace - 7:19:58 PM] Sending notification '$/cancelRequest' - (7).
[Trace - 7:19:58 PM] Sending request 'textDocument/signatureHelp - (9)'.
[Trace - 7:19:58 PM] Sending notification 'textDocument/didChange' ("t").
[Trace - 7:19:58 PM] Sending notification 'textDocument/didChange' ("t").
[Trace - 7:19:58 PM] Sending notification '$/cancelRequest' - (9).
[Trace - 7:19:58 PM] Sending request 'textDocument/signatureHelp - (10)'.
[Trace - 7:19:58 PM] Sending notification 'textDocument/didChange' ("o").
[Trace - 7:19:59 PM] Sending notification '$/cancelRequest' - (10).
[Trace - 7:19:59 PM] Sending request 'textDocument/signatureHelp - (11)'.
[Trace - 7:19:59 PM] Sending request 'textDocument/documentColor - (12)'.
[Trace - 7:19:59 PM] Sending request 'textDocument/codeAction - (13)'.
[Trace - 7:20:02 PM] Sending notification '$/cancelRequest' - (5).
[Trace - 7:20:03 PM] Received response 'textDocument/completion - (5)' in 5839ms.
Using Svelte v3.32.3 from ~\Frontend\node_modules\svelte\compiler
Using Svelte v3.32.3 from ~\Frontend\node_modules\svelte\compiler
[Trace - 7:20:03 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 7:20:03 PM] Received response 'textDocument/signatureHelp - (6)' in 5775ms.
[Trace - 7:20:04 PM] Sending request 'textDocument/codeAction - (14)'.
[Trace - 7:20:04 PM] Sending notification '$/cancelRequest' - (13).
[Trace - 7:20:09 PM] Received response 'textDocument/signatureHelp - (7)' in 11269ms.
Using Svelte v3.32.3 from ~\Frontend\node_modules\svelte\compiler
Using Svelte v3.32.3 from ~\Frontend\node_modules\svelte\compiler
[Trace - 7:20:09 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 7:20:09 PM] Received response 'textDocument/semanticTokens/full - (8)' in 11304ms.
[Trace - 7:20:09 PM] Received response 'textDocument/signatureHelp - (9)' in 11076ms.
[Trace - 7:20:09 PM] Received response 'textDocument/signatureHelp - (10)' in 10879ms.
[Trace - 7:20:09 PM] Received response 'textDocument/signatureHelp - (11)' in 10716ms.
[Trace - 7:20:09 PM] Received response 'textDocument/documentColor - (12)' in 10669ms.
[Trace - 7:20:09 PM] Received response 'textDocument/codeAction - (13)' in 10594ms.
[Trace - 7:20:09 PM] Received response 'textDocument/codeAction - (14)' in 5515ms.

Trying the clean Svelte template and Sapper webpack template in different environments with trace on yields these results:

Local drive - Svelte template: 22ms
Network drive - Svelte template: 34ms
Local drive - Sapper Webpack: 307ms
Network Drive - Sapper Webpack: 6002ms

There didn't seem to be much difference with/without Typescript or with/without sveltestrap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions