GitLiveApp / GitLive

GitLive Docs
82 stars 24 forks source link

Dart code action never finishes #92

Closed ghost closed 2 years ago

ghost commented 2 years ago

Issue Type: Performance Issue

I'm using the VSCode extension on a flutter project.

In my settings.json I have:

{
  "editor.codeActionsOnSave": {
    "source.organizeImports": true,
  },
}

When the extension is enabled, every time I try to save a file, I get the info message

Saving 'drawing_test.dart': Getting code actions from ''Dart''

which never finishes and blocks VSCode other commands/actions.

image


When I disable the extension, the info message appears and quickly go away without blocking anything.

Extension version: 14.0.7 VS Code version: Code 1.61.2 (6cba118ac49a1b88332f312a8f67186f7f3c1643, 2021-10-19T15:49:28.381Z) OS version: Darwin x64 20.6.0 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|5, 4, 4| |Memory (System)|16.00GB (1.26GB free)| |Process Argv|--crash-reporter-id 5f78dc76-1d5f-456c-b50c-b31cf014dea6| |Screen Reader|no| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 34 131 29574 code main 20 66 29577 gpu-process 0 33 29579 utility 60 279 29581 window (forms_filter_options.dart — Untitled (Workspace)) 49 377 29898 extensionHost 0 33 30243 electron_node server.js 0 66 30244 electron_node languageserver.js 1 98 30245 electron_node main.js 0 0 30561 bash /Users/valentin/flutter/flutter/bin/flutter daemon 34 147 30583 /Users/valentin/flutter/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev --packages=/Users/valentin/flutter/flutter/packages/flutter_tools/.packages /Users/valentin/flutter/flutter/bin/cache/flutter_tools.snapshot daemon 4 0 30651 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -version 138 197 30563 /Users/valentin/flutter/flutter/bin/cache/dart-sdk/bin/dart /Users/valentin/flutter/flutter/bin/cache/dart-sdk/bin/snapshots/analysis_server.dart.snapshot --lsp --client-id=VS-Code --client-version=3.28.0 46 49 30653 /Users/valentin/flutter/flutter/bin/cache/dart-sdk/bin/dart /Users/valentin/flutter/flutter/bin/cache/dart-sdk/bin/snapshots/pub.dart.snapshot upgrade 19 49 30608 /Users/valentin/flutter/flutter/bin/cache/dart-sdk/bin/dart pub global run devtools --machine --try-ports 10 --allow-embedding 27 33 30646 electron_node config.js 0 33 29899 watcherService 17 131 29897 shared-process 0 49 29900 ptyHost 0 0 30222 /bin/zsh -l 0 0 30657 /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command= 42 49 30652 window (Issue Reporter) ```
Workspace Info ``` | Window (forms_filter_options.dart — Untitled (Workspace)) | Folder (NovadeLiteBackend): 2942 files | File types: ts(1238) js(580) map(574) sql(44) yaml(15) html(10) yml(9) | json(9) md(6) csv(5) | Conf files: github-actions(1) launch.json(1) settings.json(1) | tasks.json(1) package.json(1) tsconfig.json(1) | Launch Configs: node(3) | Folder (NovadeLite): more than 20081 files | File types: html(4092) h(2274) dart(2149) pcm(627) m(566) | timestamp(517) part(408) svg(385) d(373) o(369) | Conf files: github-actions(1) launch.json(1) settings.json(1) | Launch Configs: dart(10); ```
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492:30256859 pythontb:30283811 pythonptprofiler:30281270 vsdfh931cf:30280410 vshan820:30294714 vstes263:30335439 pythondataviewer:30285071 pythonvsuse255:30340121 vscod805:30301674 pythonvspyt200:30340761 binariesv615:30325510 vsccppwt:30382697 bridge0708:30335490 pygetstartedt3:30385195 dockerwalkthru:30377721 bridge0723:30353136 pythonrunftest32:30373476 pythonf5test824:30373475 javagetstartedt:30391933 pythonvspyt187:30373474 vsqsis400:30386382 vsaa593:30376534 vssld246:30386377 ```
Ygnys commented 2 years ago

Thanks for reporting, we will look into it.

ValentinVignal commented 2 years ago

To add some details, it also get a lot more worse when I open and work on a file that has some potential conflict highlighted.

I hope this can help you troubleshoot the issue.

Ygnys commented 2 years ago

Thanks, @ValentinVignal, we're working on reproducing the issue. Could you try removing "source.organizeImports": true and let us know if there's any difference?

ValentinVignal commented 2 years ago

@Ygnys When I remove "source.organizeImports": true, it eventually manages to finish to save the file. But it is taking quite long (at least 5s).

nbransby commented 2 years ago

Hi @ValentinVignal could you let us know if you are still experiencing this with the latest version?

ValentinVignal commented 2 years ago

Hello @nbransby, with the latest version, I don't face (or at least see) the issue anymore. Thank you!

You can close the issue if you want.