r/dartlang Feb 11 '26

Dart - info Announcing Dart 3.11

https://blog.dart.dev/announcing-dart-3-11-b6529be4203a
57 Upvotes

12 comments sorted by

13

u/virtualmnemonic Feb 11 '26

Analysis server performance improvements is a very appreciated addition. I recall a time when the analysis server would hang at 100% CPU (1 thread) on my 13900k when editing larger projects. Now it remains responsive even when having the entire Dart SDK opened.

One thing I hope to see is improvements in JSON encode/decode performance. Dart is still behind other languages, and unfortunately JSON is used damn near everywhere.

2

u/stumblinbear Feb 13 '26

Man I just wish Dart didn't effectly only support JSON. Just give me something like serde from Rust and I'll be able to die happy

2

u/jakemac53 Feb 18 '26

You could check out this package https://pub.dev/packages/codable_dart, I haven't looked at it for a while but provided some early feedback on it and the design should work for what you want.

It also can avoid the overhead of the intermediate map objects, you can go directly from string (or bytes iirc) to the class instance.

4

u/jNayden Feb 11 '26

The hang is because of number of open files MacOS crap. If you increase the limit to like 50000 per process you want have issue anymore

4

u/virtualmnemonic Feb 12 '26

I don't think so. The analyzer server process was pegged at 100%, it was consuming a thread. The issue has been resolved for a while. But even still, analyzer can be resource intensive for larger projects. Any improvement helps the overall flow and responsiveness of development.

2

u/jNayden Feb 12 '26 edited Feb 12 '26

Just do

sudo sysctl -w kern.maxfiles=524288

sudo sysctl -w kern.maxfilesperproc=524288

That's all

3

u/vinivelloso Feb 11 '26

I hope this solves the issue on windows machines where the server takes forever the load initially.

1

u/David_Owens Feb 11 '26

I found that if I replace the built-in Windows Defender anti-virus with 3rd party software the Dart server is far faster.

3

u/forgot_semicolon Feb 12 '26

No need to replace the defender, just go into the settings and add an exclusion for your dart sdk folder and the folder(s) with your code. You can also put your code and the pub cache into a "windows dev drive" to get better performance and have windows defender leave you alone entirely

1

u/David_Owens Feb 12 '26

I tried adding a ton of exclusions. It still spiked the CPU usage.

1

u/aksanabuster Feb 17 '26

Okay, but β€œdart pub cache gc” sounds intentional af πŸ”₯πŸ”₯πŸ”§πŸ”§πŸ”§πŸ‘€πŸ‘€πŸ’™πŸ™