Skip to content

Cancel all current work with highlight refs when changes come in#52946

Merged
CyrusNajmabadi merged 16 commits intodotnet:release/dev16.10from
CyrusNajmabadi:restartTagging
Apr 27, 2021
Merged

Cancel all current work with highlight refs when changes come in#52946
CyrusNajmabadi merged 16 commits intodotnet:release/dev16.10from
CyrusNajmabadi:restartTagging

Conversation

@CyrusNajmabadi
Copy link
Contributor

Highlight refs demonstrates a problem with some of the tagger cleanup that recently went in. Part of highlight refs is highly synchronous. Namely that we remove the tags on movement or edits immediately so that we don't show "stale" tags. This is problematic because the previous pr made it much more efficient to compute tags. So we could end up with clearing the tags and tehn very efficiently showing them again.

The fix here is in two parts. The first is that we make the delay for highlight refs closer to the perceived delay that we used to incur in the older less efficient system once we added up all the delays that used to have.

The second is that because we are clearign out the old values, we don't actually want the mode where we take the results we have and introduce them very soon after they're available. Instead, we explicitly attempt to cancel any computation work and only compute the results against the latest when new events come in. We initially had a batchign work queue for this. however, the batch was only ever up to two items (just to say if we were on the initial item on a subsequent item). because of that, it was just easier to go to simple task queuing to represent this concept of stopping the current set of work and just restarting the new computation

Manual testing in practice indicated that this feels good and non-distracting. With resutls still coming up in a reasonable amount of time, without it feeling aggressive.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner April 27, 2021 00:29
@ghost ghost added the Area-IDE label Apr 27, 2021
@CyrusNajmabadi CyrusNajmabadi requested a review from dibarbet April 27, 2021 00:32
@dibarbet
Copy link
Member

@CyrusNajmabadi this should probably target release/dev16.10

@CyrusNajmabadi CyrusNajmabadi changed the base branch from main to release/dev16.10 April 27, 2021 17:54
@CyrusNajmabadi
Copy link
Contributor Author

Done!

@CyrusNajmabadi CyrusNajmabadi disabled auto-merge April 27, 2021 17:57
@CyrusNajmabadi
Copy link
Contributor Author

@jinujoseph This needs m2 approval. My recent tagger speedup work did too good a job, and makes it so that some tags can appear too quickly (making it feel like things are flashy). So this restores a better feeling behavior here. We will want to take this for 16.10 as it can otehrwise be distracting and noisy. This change feels safe.

@CyrusNajmabadi CyrusNajmabadi merged commit 617e59c into dotnet:release/dev16.10 Apr 27, 2021
@CyrusNajmabadi CyrusNajmabadi deleted the restartTagging branch April 27, 2021 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants