VSCode taking a very long time to format saved file

I have VSCode set to automatically format .jl files on save, and also to save files whenever focus changes.

Most of the time this works brilliantly, formatting my files in a flash. But occasionally formatting a file will take several minutes for a 150 line file.

Has anybody else encountered this?

I’m running the julia extension for VSCode version 1.38.2

system info:

julia> versioninfo()
Julia Version 1.8.3
Commit 0434deb161 (2022-11-14 20:14 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 32 × AMD Ryzen 9 7950X 16-Core Processor
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, znver3)
  Threads: 32 on 32 virtual cores
  JULIA_EDITOR = code.cmd

Maybe it’s taking a while to load everytime the language server has to restart. What setting are you using to format files on save?

Here are my vscode settings:

    "terminal.integrated.commandsToSkipShell": [

    "editor.fontFamily": "JuliaMono,Consolas,Courier New ,monospace",
    "editor.fontLigatures": "'zero', 'ss02', 'ss04', 'ss05', 'ss08'",
    "julia.symbolCacheDownload": true,
    "julia.enableTelemetry": true,
    "files.autoSave": "onFocusChange",
    "workbench.editor.enablePreview": false,
    "workbench.editor.revealIfOpen": true,
    "git.confirmSync": false,
    "editor.accessibilitySupport": "off",
    "terminal.integrated.tabs.enabled": false,
    "editor.minimap.enabled": false,
    "git.enableSmartCommit": true,
    "editor.wordWrap": "on",
    "editor.defaultFormatter": "julialang.language-julia",
    "editor.formatOnSave": true,
    "julia.NumThreads": "auto",
    "julia.useCustomSysimage": true