r/FlutterDev • u/yaonek • Jul 08 '26
Discussion VS Code Dart Analyzer is much slower than Android Studio on a high-end laptop. Anyone else?
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
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 27 '26
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:
%LOCALAPPDATA%\dartServer)<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. 🙂
5
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/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
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/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.
0
u/[deleted] Jul 08 '26
[deleted] — view deleted comment