Only iterate panes one time when updating settings#10997
Merged
4 commits merged intomainfrom Aug 23, 2021
Merged
Conversation
Rosefield
reviewed
Aug 23, 2021
The original code for settings reload iterated the entire tree of panes for every profile in the new settings, and constructed a TerminalSettings object for every profile even if it later went unused. This implementation: 1. Collects all new profiles keyed by guid 1.a. Adds the "defaults" profile to the map 2. Iterates every pane, just once, and updates its profile if it shows up in the list by GUID. I've merged all of the per-tab code into a single loop. Because of 1.a., this code can now update panes that are hosting the "base" profile.
f852206 to
82aef2f
Compare
lhecker
reviewed
Aug 23, 2021
Member
lhecker
left a comment
There was a problem hiding this comment.
Just a nit. Not approving just so it doesn't automerge accidentally.
Member
Author
|
@msftbot make sure @zadjii-msft signs off |
|
Hello @DHowett! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
zadjii-msft
approved these changes
Aug 23, 2021
|
🎉 Handy links: |
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The original code for settings reload iterated the entire tree of panes
for every profile in the new settings (O(mn)) and constructed a
TerminalSettings object for every profile even if it later went unused.
This implementation:
1.a. Adds the "defaults" profile to the map
up in the list by GUID.
I've merged all of the per-tab code into a single loop.
Because of 1.a., this code can now update panes that are hosting the
"base" profile.