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 Analysis Poor Performance - Group Issue #56838

Closed
AndryHTC opened this issue Oct 3, 2024 · 5 comments
Closed

Dart Analysis Poor Performance - Group Issue #56838

AndryHTC opened this issue Oct 3, 2024 · 5 comments
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-enhancement A request for a change that isn't a bug

Comments

@AndryHTC
Copy link

AndryHTC commented Oct 3, 2024

What I love most about Dart is the developer experience.

For me, a huge part—roughly 90%—of this positive DX stems from features like method and attribute inspection via autocomplete, which provides instant feedback on the correctness of your code.

The Dart and Flutter communities have embraced this philosophy, and it's evident in how they design their packages to support this intuitive workflow.

That’s why fast and robust static analysis is essential and must remain a top priority for Dart.

This is a recurring group of issues that our team has been experiencing for years, such as:

Most of them are P2-P3 and stuck for months even years.
What I'm asking is to give more priority to one of Dart's biggest strengths, the static analysis.

@dart-github-bot
Copy link
Collaborator

Summary: The user reports slow and unreliable Dart analysis performance, impacting developer experience. They highlight the importance of fast analysis for features like autocomplete and request prioritization for improving analysis speed.

@dart-github-bot dart-github-bot added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-enhancement A request for a change that isn't a bug labels Oct 3, 2024
@mraleph
Copy link
Member

mraleph commented Oct 3, 2024

Thanks for filing the issue - but it is not really actionable. Some of these are not even analyzer issues at all (e.g. #56755). It is not like there is a single solution for all these issues - analyzer simply does a lot of things and the more code your throw at it the slower it gets.

We have been looking at this from different angles for a while now, for example workspaces should significantly improve analyzer memory usage and responsiveness on monorepos.

If you have some concrete problems with the analyzer it would help us more if you file those with reproductions as separate issues.

@mraleph mraleph closed this as completed Oct 3, 2024
@AndryHTC
Copy link
Author

AndryHTC commented Oct 3, 2024

Hi @mraleph,

Thanks for your response. Nobody said there's a one-size-fits-all solution, but seeing so many related issues open for years feels like there's an underlying problem with the analyzer.

Even small projects are experiencing these performance issues, as exposed by many, which makes me think it's not just about large codebases. Grouping these problems together was meant to show that it's a widespread issue affecting many developers.

If nothing can be done, I understand closing the group issue. What I don't understand is not closing the years-old issues.
I hope the team can take a closer look at these recurring problems to improve the analyzer's performance for everyone.

@mraleph
Copy link
Member

mraleph commented Oct 3, 2024

Even small projects are experiencing these performance issues, as exposed by many, which makes me think it's not just about large codebases.

I am not so sure about this - so far we were never able to reproduce any performance issues on small projects (outside of issues like #56355 - which is obviously just a bug with an infinite loop of some sort). Analyzer is rather responsive on small code bases (though it might still consume more memory than truly necessary). Scalability problems only surface when you start throwing significant amount of code at it.

@AndryHTC
Copy link
Author

AndryHTC commented Oct 3, 2024

Well... the reality is that it is. But maybe you have noticed that in issues like #55281 and #56307, as I've seen you've already moved the waters in plenty of the issues that I've referenced. I'm so happy for your efforts 👍

Also, I don't know what "significant amount of code" translates, in this context. 10 000 lines? 1 000 files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants