Skip to content

analyzer takes many seconds for Snippets+Overrides completions in files that are part of "large" libraries #4364

@josh-audio

Description

@josh-audio

Autocomplete is much faster for me when I use the old analyzer protocol:

Dart.Analyzer.1.mp4

This is a proprietary codebase so unfortunately I'm not able to share it. A few things about this codebase which may be relevant:

  1. This is a web application which uses dart2js to compile to HTML + JS.
  2. This codebase is spread over ~20 packages. There is a main package which imports all the sub-packages.
  3. The main library has a file which imports 33 packages, including 8 from the Dart SDK. It has 49 part declarations for files within the repository. Most other files don't have imports, and instead use part of to inherit the global scope provided by the main file. Most of the other packages in this project do the same.

Please let me know if there is anything else I can share about this codebase.

I've included the info above about imports because the new analyzer protocol seems slowest when trying to autocomplete in the global scope. As you can see in the video, it's much faster once there's a narrower context.

SDK: v2.19 (from Flutter 3.7.0)
OS: Windows 11
Specs: 8th generation i7, 32gb ram

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serveris performancerelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions