Reuse webviews in walkthrough steps instead of creating them each time. #186267
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.
Fixes:
#166890
We used to recreate webviews for each step. Creating webviews adds a delay due to the underlying scaffolding necessary.
With this change, we only recreate webviews when the type of media being used for the step changes.
For example, when we transition from a step with an image media type to a step with svg or markdown media type.
For the built in walkthroughs (which mostly use SVGs) image rendering times are faster (verified via Performance profiles as well).
Also verified for walkthroughs from extensions such as GitLens, Luna paint (which mostly use markdown media).