terminal/src/renderer
Chester Liu 97d6456476
Improve cluster construction performance (#5584)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
## Summary of the Pull Request

A tiny performance fix in `renderer.cpp`.

<!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> 
## References

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
* [ ] Closes #xxx
* [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) 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

<!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

The cluster construction code is intensively called during rendering. Even though a single `back()` is fast, but accumulated `back()`s still take a noticiable amount of CPU cycles.


Before:

![perf1](https://user-images.githubusercontent.com/4710575/80323322-4342aa80-885d-11ea-92fb-06998dcef327.png)

After:

![图片](https://user-images.githubusercontent.com/4710575/80323336-52c1f380-885d-11ea-8244-4d8d432f7c52.png)

<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

Manually validated.
2020-04-28 15:41:44 +00:00
..
base Improve cluster construction performance (#5584) 2020-04-28 15:41:44 +00:00
dx Use grayscale AA always on non-opaque backgrounds (#5277) 2020-04-24 17:16:34 +00:00
gdi ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00
inc Show a double width cursor for double width characters (#5319) 2020-04-15 19:23:06 +00:00
uia Reduce CursorChanged Events for Accessibility (#5196) 2020-04-01 15:56:20 +00:00
vt Use string_view where possible (#5457) 2020-04-22 10:24:19 -07:00
wddmcon Move ConPTY to use til::bitmap (#5024) 2020-03-23 15:57:54 +00:00
dirs Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00