Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix slowdown on open/close tabs when the user has many profiles #7993

Merged
1 commit merged into from
Oct 21, 2020

Conversation

PankajBhojwani
Copy link
Contributor

@PankajBhojwani PankajBhojwani commented Oct 21, 2020

Summary of the Pull Request

Just deleting an unnecessary call to _UpdateCommandsForPalette

Note: This only fixes slowdown when opening/closing a tab, but not upon first startup (we still need to call _UpdateCommandsForPalette there

References

Fixes the slowdown described in #7820 for opening and closing tabs, but doesn't improve startup time dramatically.

Validation Steps Performed

Tested with ~100 profiles in my settings file

@ghost ghost added Area-Performance Performance-related issue Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. labels Oct 21, 2020
@Don-Vito
Copy link
Contributor

@PankajBhojwani - will the command palette be still updated if I have it open in the tab-switch mode and create a new tab? I guess the answer is yes, but just checking.

@zadjii-msft
Copy link
Member

@PankajBhojwani - will the command palette be still updated if I have it open in the tab-switch mode and create a new tab? I guess the answer is yes, but just checking.

@Don-Vito Yep, this function call was actually entirely a vestigial remnant from an earlier prototype. The tab switcher mode for the command palette uses a totally different mechanism for populating the list of tabs.

@DHowett
Copy link
Member

DHowett commented Oct 21, 2020

I'd suggest that you remove the Closes verbiage in the PR body, as it doesn't fully address the issue and we don't want it closed.

We need to figure our how to improve startup time.

@zadjii-msft zadjii-msft added the AutoMerge Marked for automatic merge by the bot when requirements are met label Oct 21, 2020
@ghost
Copy link

ghost commented Oct 21, 2020

Hello @zadjii-msft!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 8 hours, a condition that will be fulfilled in about 5 hours 22 minutes. No worries though, I will be back when the time is right! 😉

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@DHowett
Copy link
Member

DHowett commented Oct 21, 2020

@msftbot merge this in 4 minutes

@ghost
Copy link

ghost commented Oct 21, 2020

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:

  • I won't merge this pull request until after the UTC date Wed, 21 Oct 2020 19:37:17 GMT, which is in 4 minutes

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".

@ghost ghost merged commit 895ac06 into master Oct 21, 2020
@ghost ghost deleted the dev/pabhoj/tab_perf branch October 21, 2020 19:38
@Don-Vito
Copy link
Contributor

Don-Vito commented Oct 22, 2020

@zadjii-msft , @PankajBhojwani - this did regressed. Once if you had the command palette open on the tab switcher and you were added the new tab it was added to the list of the commands immediately. Now it will will be updated only on the next opening of the tab switcher.

@DHowett
Copy link
Member

DHowett commented Oct 22, 2020

@Don-Vito that could have also been due to #7952

@Don-Vito
Copy link
Contributor

Don-Vito commented Oct 22, 2020

@DHowett - it is certainly is. I already verified it (while merging main to #7977). Sorry @PankajBhojwani 😄

@DHowett
Copy link
Member

DHowett commented Oct 22, 2020

So, generally we consider the switcher to be “ephemeral”; it shouldn’t be onscreen while tabs are changing, but it shouldn’t be dangerous if it is. So long as it doesn’t crash, i’m okay with an n-1 state snapshot being on display.

@Don-Vito
Copy link
Contributor

So, generally we consider the switcher to be “ephemeral”; it shouldn’t be onscreen while tabs are changing, but it shouldn’t be dangerous if it is. So long as it doesn’t crash, i’m okay with an n-1 state snapshot being on display.

@DHowett - in "command palette highlighting" I worked really hard to change the highlighted text if the command name is changed in the background (e.g. when new tab is open). Can I remove it?

DHowett pushed a commit that referenced this pull request Oct 27, 2020
## Summary of the Pull Request
Just deleting an unnecessary call to `_UpdateCommandsForPalette`

**Note:** This only fixes slowdown when opening/closing a tab, but not upon first startup (we still need to call `_UpdateCommandsForPalette` there

## References
Fixes the slowdown described in #7820 for opening and closing tabs, but doesn't improve startup time dramatically.

## Validation Steps Performed
Tested with ~100 profiles in my settings file

(cherry picked from commit 895ac06)
@ghost
Copy link

ghost commented Nov 11, 2020

🎉Windows Terminal v1.4.3141.0 has been released which incorporates this pull request.:tada:

Handy links:

@ghost
Copy link

ghost commented Nov 11, 2020

🎉Windows Terminal Preview v1.5.3142.0 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Performance Performance-related issue AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants