Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dart_frog VSCode extension slows down VSCode significantly #1487

Open
lukasnevosad opened this issue Aug 20, 2024 · 5 comments
Open

dart_frog VSCode extension slows down VSCode significantly #1487

lukasnevosad opened this issue Aug 20, 2024 · 5 comments
Labels
bug Something isn't working as expected p1 High-priority issues at the top of the work list product: vscode extension Issues related to the Dart Frog VSCode extension

Comments

@lukasnevosad
Copy link

Type: Bug

When the extension is enabled, VSCode is significantly slower, even in code that has nothing to do with Dart (TS, Next.js). It especially shows when e.g. clicking a symbol to see its definition definition or it shows "Running 'File Create' participants..." for many seconds when a simple new empty file is created.

Extension version: 0.2.3
VS Code version: Code 1.92.2 (Universal) (fee1edb8d6d72a0ddff41e5f71a671c23ed924b9, 2024-08-14T17:29:30.058Z)
OS version: Darwin arm64 23.5.0
Modes:

System Info
Item Value
CPUs Apple M1 (8 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 5, 4, 5
Memory (System) 16.00GB (1.26GB free)
Process Argv --crash-reporter-id 311a7b37-1935-43ef-9642-1aa3900866b8
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
9c06g630:31013171
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupytercf:31046870
impr_priority:31102340
nativerepl1:31104043
refactort:31108082
pythonrstrctxt:31112756
flightc:31119335
wkspc-onlycs-t:31111718
wkspc-ranged-t:31118572

@alestiago alestiago added the product: vscode extension Issues related to the Dart Frog VSCode extension label Aug 22, 2024
@alestiago
Copy link
Contributor

alestiago commented Aug 22, 2024

I think I've experienced similar behaviours but I haven't invested the time into benchmarking it. I have a gut feeling that there is a resource that is leaking, might be regarding the daemon or probably during initialization.

@lukasnevosad have you benchmarked or inspected the extension to see what function is using resources that might slow down VSCode?

@lukasnevosad
Copy link
Author

I am afraid I have no idea how to debug this. This report came from "Extensions Bisect" feature of VSCode, which pinpointed this extension. I could clearly see immediate results turning the extension on/off. It then even created this GitHub issue on by behalf.

The slow down occurred multiple times before and has not occurred again since I turned this extension off.

The project I've been working on with dart_frog (which is otherwise awesome, btw.) is on hold at the moment, but I will certainly need to switch the extension on again when I return to it, so I will try to do some more debugging then.

@orestesgaolin
Copy link

orestesgaolin commented Oct 13, 2024

I'm experiencing the same issues, especially around pasting text, pressing Enter and saving files. It applies to not only .dart files but also .md or bash.

In the VS Code stats you can see that Dart Frog extensions can take up to 1000 ms to load whereas other extensions activate within 100 ms.

example

screenshot_20241013_135747

I think one of the issues is also the fact that the extension gets activated with any project containing pubspec.yaml, which in my case was not the intended behavior (e.g. when working with Flutter or pure Dart projects).

@tomarra
Copy link
Contributor

tomarra commented Oct 15, 2024

I think one of the issues is also the fact that the extension gets activated with any project containing pubspec.yaml, which in my case was not the intended behavior (e.g. when working with Flutter or pure Dart projects).

Hey @orestesgaolin thanks for the feedback here. I'll add a P1 to this given that we have some direction now but I don't have much in team cycles to dedicate to this in the short term. If you are able to help debug or implement a solution and get a PR up it would be greatly appreciated!

@tomarra tomarra added bug Something isn't working as expected p1 High-priority issues at the top of the work list labels Oct 15, 2024
@tomarra tomarra moved this from Needs Triage to Backlog in VGV Open Source 🦄 🧙🌟 Oct 15, 2024
@orestesgaolin
Copy link

All good! I can enable the extension when I need it, so that's not a blocker :) I'll report back if anything obvious pops up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected p1 High-priority issues at the top of the work list product: vscode extension Issues related to the Dart Frog VSCode extension
Projects
Status: Backlog
Development

No branches or pull requests

4 participants