Asynchronously decorate quick outline view via DecorationManager #1922 #1929
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What it does
The Quick Outline View currently applies (i.e., calculates and draws) decorations for override indicators synchronously. In case the calculation of the indicator takes long, it blocks the UI. The ordinary Outline View defers the responsibility of calculating and applying decorations to the
DecorationManager
. This ensures that (1) that task is performed asynchronously via a dedicated job and (2) that theDecorationManager
takes care of the current user configuration (i.e., whether those indicators shall be shown or not), which the Quick Outline View currently replicates.With this change, the Quick Outline View uses the same label decorator as the ordinary Outline View, which makes the
DecorationManager
process the override label decorator asynchronously instead of applying it synchronously.Contributes to #1922
This complements #1926, which improves performance of the business logic used for calculating labels of the view, while this one ensures that the business logic is completely moved outside of the UI thread to be executed asynchronously.
How to test
A reproducer has been kindly provided by @fedejeanne in:
To reproduce, do the following:
Broke1
and clickCtrl + O
twiceWithout this patch, the quick outline view will take a high amout of time to open and block the UI while with this patch it will open immediately and stay responsible.
Author checklist