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

Reserve textClusterColumns vector for performance #5645

Merged
1 commit merged into from Apr 29, 2020

Conversation

skyline75489
Copy link
Collaborator

@skyline75489 skyline75489 commented Apr 29, 2020

Summary of the Pull Request

In tonight's episode of "Can we be even faster?", we will... you know what, just take a look at the code.

References

PR Checklist

  • Closes #xxx
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

It is actually a quite common technique seen inside the codebase to first reserve the spaces before pushing something into vectors. I don't know why it is not used here.

Before:
before

After:

after

Validation Steps Performed

Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems sensible to me.

@zadjii-msft
Copy link
Member

@msftbot make sure @miniksa signs off on this

@ghost ghost added the AutoMerge Marked for automatic merge by the bot when requirements are met label Apr 29, 2020
@ghost
Copy link

ghost commented Apr 29, 2020

Hello @zadjii-msft!

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'll only merge this pull request if it's approved by @miniksa

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 zadjii-msft added Area-Performance Performance-related issue Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues labels Apr 29, 2020
@skyline75489
Copy link
Collaborator Author

About the "There is a circular dependency in the target dependency graph involving target "ComputeGetResolvedWinMD". I've actually seen this in my local PC. Rebuilding fixes this. I don't really get it why it happens this often on the CI environment.

@zadjii-msft
Copy link
Member

About the "There is a circular dependency in the target dependency graph involving target "ComputeGetResolvedWinMD". I've actually seen this in my local PC. Rebuilding fixes this. I don't really get it why it happens this often on the CI environment.

Yea, I forwarded you a mail we've got open with the MsBuild team on this. They're still trying to figure it out.

Copy link
Contributor

@DHowett-MSFT DHowett-MSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah idk why we didn’t do that before

Love your PR body messages

@miniksa
Copy link
Member

miniksa commented Apr 29, 2020

HOLD THE FLIPPING PHONE @skyline75489. How did you get the perf numbers per line to show up like that inside Visual Studio?!

Copy link
Member

@miniksa miniksa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me.

If you're looking for one more follow on, I think we might be a little too aggressive at shrinking the vectors back down when the run lengths get smaller. I see that a lot with things like cacafire where it seems we spend more time expanding/shrinking the vector than the memory savings is worth.

@ghost ghost merged commit e8a6811 into microsoft:master Apr 29, 2020
@ghost
Copy link

ghost commented May 5, 2020

🎉Windows Terminal Release Candidate v0.11.1251.0 (1.0rc1) has been released which incorporates this pull request.:tada:

Handy links:

@DHowett
Copy link
Member

DHowett commented Jul 2, 2020

🎉 Once again, thanks for the contribution!

This pull request was included in a set of conhost changes that was just
released with Windows Insider Build 20161.

@skyline75489 skyline75489 deleted the fix/text-cluster-columns-my-boy branch January 25, 2021 02:57
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 Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues AutoMerge Marked for automatic merge by the bot when requirements are met
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants