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

EndPaint outside of lock for DxEngine #6523

Closed
miniksa opened this issue Jun 15, 2020 · 5 comments
Closed

EndPaint outside of lock for DxEngine #6523

miniksa opened this issue Jun 15, 2020 · 5 comments
Labels
Area-Performance Performance-related issue Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Milestone

Comments

@miniksa
Copy link
Member

miniksa commented Jun 15, 2020

The EndPaint command will naturally send all the queued drawing commands onto the underlying rendering target/bitmap/surface. Since all the data has already been captured and queued, there's no real sense in holding the lock on the I/O thread while the draw commands are performed. So this should probably move into the Present phase. But it will have to be reconciled with the invalid rectangle/scroll things that are usually done at EndPaint time.

@miniksa miniksa added Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Area-Performance Performance-related issue Product-Terminal The new Windows Terminal. Issue-Task It's a feature request, but it doesn't really need a major design. labels Jun 15, 2020
@miniksa miniksa self-assigned this Jun 15, 2020
@ghost ghost added the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Jun 15, 2020
@DHowett DHowett added this to the Terminal v1.x milestone Jun 15, 2020
@DHowett DHowett removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Jun 15, 2020
@zadjii-msft zadjii-msft modified the milestones: Terminal v2.0, Backlog Jan 4, 2022
@miniksa miniksa removed their assignment Mar 31, 2022
@zadjii-msft zadjii-msft modified the milestones: Backlog, EIM Summer 2022 Jun 13, 2022
@zadjii-msft
Copy link
Member

🤔

Why did we never do this? This might have just sorted out like, a bunch of the miscellaneous deadlocks we're tracking (ala #12607)

@zadjii-msft
Copy link
Member

@lhecker
Copy link
Member

lhecker commented Aug 16, 2022

D2D has an internal batch size limit for draw commands, so given enough text on the screen, it'll try to call D3D functions potentially many times before EndDraw is even called.
That said, it can't hurt to merge this. Reduces the chance for our issue even further...

@zadjii-msft
Copy link
Member

Note to future self: this seemingly did not noticeably improve Terminal perf. Maybe it helps conhost perf, but I didn't have the cycles to further sanity check if this wouldn't just explode (esp. over RDP).

I'm closing this tab out now, see y'all in two more years when I reopen this 😜

@zadjii-msft zadjii-msft modified the milestones: EIM Summer 2022, Backlog Nov 28, 2022
@lhecker
Copy link
Member

lhecker commented Oct 10, 2024

Oh, we do this now in AtlasEngine!

@lhecker lhecker closed this as completed Oct 10, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Oct 10, 2024
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 Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

5 participants