Skip to content

Use a ResolvedLibraryResult rather than a ResolvedUnitResult for refactors #64319

Description

@bwilkerson

Inspired by https://dart-review.googlesource.com/c/sdk/+/551820.

Refactors, including fixes and assists, often span multiple files. In these cases it would be more efficient to request the results of resolving the whole library than it is to request the results for each individual unit in the library (because getting the results for a unit means getting the results for a library and then discarding the results for the other units). Doing this would likely reduce the cost of at least some refactors without increasing the cost of any.

This could (and probably should) be expanded to include a cache of all of the libraries referenced by the operation in order to better support refactors that span multiple libraries.

There might be other places in the analysis_server that could benefit from this same approach.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.type-performanceIssue relates to performance or code size

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions