Skip to content

main method CodeLens provider can take 5s, delaying interaction with other CodeLenses #5047

@DanTup

Description

@DanTup

When testing Augmentation/Augmented CodeLens, I frequently see 5s delays in being able to interact with them. This appears to be caused by the main CodeLens provider taking a long time.

This happens because of the wait here:

const outline = await this.analyzer.fileTracker.waitForOutlineWithLength(document.uri, expectedLength, token);

We should remove this wait and instead return no items if the outline isn't ready, and schedule a (one-time) refresh of CodeLens once the outline updates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresis bugrelies 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