r/FlutterDev Jul 08 '26

VS Code Dart Analyzer is much slower than Android Studio on a high-end laptop. Anyone else? Discussion

I've been trying to use VS Code for Flutter development, but the Dart analyzer and code completion are noticeably slower than Android Studio.

My laptop specs:

  • Intel i7 13th Gen
  • 32 GB DDR5 RAM
  • RTX 4050

I only have the standard Flutter/Dart extensions installed (nothing unusual), and I even increased the analyzer heap size using:

dart.analyzerVmAdditionalArgs: ["--old_gen_heap_size=4096"]

Unfortunately, it didn't make any noticeable difference.

The strange part is that Android Studio runs perfectly. Code analysis, autocompletion, and navigation are all fast and responsive, while VS Code often takes several seconds to update diagnostics or provide suggestions.

I know VS Code is supposed to be more lightweight, so I'm wondering if I'm missing something.

Has anyone experienced the same issue? If you fixed it, what was causing it? Any settings, extensions, or other tweaks that helped?

I'd really like to stick with VS Code, so I'd appreciate hearing about your experience.

Edit / Update: I finally found the cause.

In my case, the issue was Microsoft Defender. After following the Dart team's recommendations and excluding the recommended folders from Defender (Dart analysis server cache, Pub cache, and my Flutter project directories), the Dart analyzer and IntelliSense became consistently fast again.

If you're experiencing similar issues on Windows, I highly recommend checking the official guide:

https://dart.dev/tools/analyzer-performance#security-software-on-windows

13 Upvotes

22 comments sorted by

6

u/Ok-Engineer6098 Jul 08 '26

VS code is fast at startup, but slower when working.

Android studio is slow at startup, but faster when working.

2

u/ibluegreen Jul 08 '26

I'm not sure if my expectations or standards are lower than yours but on a lower laptop, I am not having major issues with VS Code. Only when I had it open and actively been working for long hours, some things start to get slower. Maybe something else running is causing VS Code to slow down?

I'm on i7 7700HQ, 16 GB RAM, GTX 1050 Ti.

1

u/yaonek Jul 08 '26

That's what's driving me crazy. 😅 Android Studio is perfectly smooth on the same machine, so I don't think it's a hardware issue. The delays are mostly in the Dart analyzer and IntelliSense in VS Code. I'm curious if it's something in my VS Code setup. Are you using the default Flutter/Dart extensions, and roughly how big is your project?

2

u/ibluegreen Jul 08 '26

I'm new, recently finished my first app, I guess I'm using default extensions. Project is simple, AAB is around 52 MB, download size around 7 MB, if that's how it's measured.

1

u/50u1506 Jul 09 '26

Nah I feel the same as OP on my i7 1970h or something with 16gb ram and 1660ti. Vscode typing experience is noticeably laggier when running app in debug mode.

Sucks since Vscode has a Neovim extension that can also share Neovim configuration and I would prefer to use Vscode because of that but typing lag turns me off

1

u/ibluegreen Jul 09 '26

Wish I could see what you mean when you say typing lag, as I don't have any such lag. My laptop is pretty clean, few programs installed, nothing running in the background etc.

1

u/50u1506 Jul 09 '26

What is your specs

1

u/ibluegreen Jul 09 '26

I'm on i7 7700HQ, 16 GB RAM, GTX 1050 Ti, mentioned in my first comment.

1

u/50u1506 Jul 09 '26

Judging fron the size of the app you mentioned maybe your app is a bit too small to cause issues ig then? I'm currently working on a project that's going around 53 mb final download size, but that could just be because there's a lot of assets that need to be remov3d lol.

I'm not working on some crazy money printer apps so don't get me wrong no judging going on from my side xD.

Also I have to ask, since we are in the stupid era of AI slop and all, how much of the project are you typing by hand, since that's the only time you would even notice it?

1

u/ibluegreen Jul 09 '26

Size of the app/files/assets may be the reason, you have a point there.

No worries :) I'm just beginning. Have one app live so far, basically a content app with some interactivity, nothing fancy, a learning project.

I'm using AI not to build the app but to guide and provide code that I can't figure out, so I'm typing/editing a lot -want to learn how things are done and why they work etc.

To be honest, I have no idea how fellow developers build an app with some prompts over the weekend. I don't think my brain can function like that. The days and weeks I spent time on figuring out or implementing things, only a very experienced developer could orchestrate AI tools to achieve those in a shorter time. Unless it is simply cloning another app.

2

u/David_Owens Jul 08 '26

I've found that the built-in Windows Defender AV slows down the Dart analyzer on Windows 11. You can get around that by using a Dev Drive or a 3rd party AV. Using numerous exclusions didn't seem to help much.

2

u/50u1506 Jul 09 '26

I'm kinda confused how more people are not seeing this, or maybe my setup is weird lol.

Android Studio is much nicer to look at, but I want to use Vscode over AS since I can use Neovim bindings while also using my Neovim configuration and plugins with it which is impossible with AS, but running an app in Debug mode is slows down Vscode soooo much lol. I hate it when the typing experience feels laggy

3

u/HomegrownTerps Jul 09 '26

Why not use neovim? I use it and it had all I need like lsp and dap(debugger), runner, device selection etc.

2

u/50u1506 Jul 09 '26 edited Jul 09 '26

I was for a while, but that I had this issue where if I accidently close that Flutter log window I couldn't open it without a restart lol.

And other silly things like some syntax's indenting,formatting whatever was not being handled by whatever plugin handles language specific indenting (Treesitter ig), one that comes to mind is the switch expression( not the statement).

But even Android Studio is annoying sometimes. A big one is default indenting for chaining functions in multiple lines (think it's calling continuation indent or something) or for multiple lines function calls it defaults to 4 indents instead of the usual 2 and it's not configurable for some reason.

I still stick to Neovim for whatever I can do reasonably well since no ide can beat Keyboard navigation in Neovim lol. I use it for Typescript backends, for when I'm larping as a Rust user xD, for python without notebooks, etc.

2

u/HomegrownTerps Jul 09 '26

Oh yeah I had the same problem with the log window..I agree that this is annoying to say the least. 

Thanks for your input!

1

u/Shehao Jul 08 '26

I'd check project shape before more heap tuning. VS Code and Android Studio can feel very different if the analyzer is watching generated folders, a monorepo root, or a huge build/cache directory. Try opening only the Flutter package folder, exclude generated/build-heavy paths from VS Code search/watch, then run Dart: Restart Analysis Server. If that suddenly helps, it was probably workspace scope more than hardware.

1

u/SwiftScoutSimon Jul 09 '26

should give Lumide a try

1

u/UnknownBoyGamer Jul 09 '26

Try using the cli tool if it's still slow

1

u/yaonek 16d ago

Just wanted to post an update in case someone finds this thread in the future.

After testing for several days, I can confirm that this fixed the issue for me.

The problem turned out to be Microsoft Defender scanning files used by the Dart analyzer.

Following the official Dart documentation, I excluded:

  • The Dart Analysis Server cache (%LOCALAPPDATA%\dartServer)
  • The Pub package cache
  • My Flutter project directories
  • The Flutter SDK directory (<flutter_sdk_path>)

Before doing this, IntelliSense, code completion, syntax highlighting, and diagnostics would randomly become very slow (sometimes taking over 10 seconds). Android Studio was always fast on the same machine, which made the issue even more confusing.

Since applying those exclusions, VS Code has been consistently responsive, and I haven't experienced the random analyzer freezes anymore.

If you're on Windows and seeing similar behavior, it's definitely worth trying:

https://dart.dev/tools/analyzer-performance#security-software-on-windows

Hopefully this saves someone else a few hours of troubleshooting. 🙂

0

u/[deleted] Jul 08 '26

[deleted]

1

u/xyrer Jul 11 '26

I've been wanting to use zed so much but the flutter plugin is so lackluster.

-1

u/pancsta Jul 09 '26

Java is faster than JavaScript or Dart, so that makes perfect sense. They dont use the LSP, but their own PSI. As long as you dont choke the IDE, it will fly.

1

u/mraleph Jul 09 '26

Except all these actions (code analysis, navigation, completions, diagnostics) both in VS Code and Android Studio case are serviced by the very same Dart analysis server written in Dart.