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.
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_serverthat could benefit from this same approach.