UIA: delay when reaching prompt with word navigation #7285

Closed
opened 2026-01-31 01:00:04 +00:00 by claunia · 13 comments
Owner

Originally created by @codeofdusk on GitHub (Apr 5, 2020).

Originally assigned to: @carlos-zamora on GitHub.

Environment

Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd] 1909 (18363.752)
Windows Terminal version (if applicable): Open Console (4f8acb4)

Any other software? NVDA, Narrator

Steps to reproduce

  1. Open Open Console.
  2. With either NVDA or Narrator, move to the start of the console and begin navigation by word.
  3. After reaching the word "reserved" (of the copyright text), move to the next word.

Expected behaviour

The prompt is quickly read.

Actual behaviour

A lag is observed before the prompt is read. A reduced lag (or none at all) is observed in Windows Terminal.

Originally created by @codeofdusk on GitHub (Apr 5, 2020). Originally assigned to: @carlos-zamora on GitHub. <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd] 1909 (18363.752) Windows Terminal version (if applicable): Open Console (4f8acb4) Any other software? NVDA, Narrator ``` # Steps to reproduce <!-- A description of how to trigger this bug. --> 1. Open Open Console. 2. With either NVDA or Narrator, move to the start of the console and begin navigation by word. 3. After reaching the word "reserved" (of the copyright text), move to the next word. # Expected behaviour The prompt is quickly read. <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> # Actual behaviour A lag is observed before the prompt is read. A reduced lag (or none at all) is observed in Windows Terminal. <!-- What's actually happening? -->
Author
Owner

@codeofdusk commented on GitHub (Apr 5, 2020):

Cc @carlos-zamora.

@codeofdusk commented on GitHub (Apr 5, 2020): Cc @carlos-zamora.
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 6, 2020):

This could be us scanning the entire 9001-line buffer for words. @codeofdusk If you change the buffer size from 120x9001 to 120x50 (in the legacy preferences panel), does the slowdown disappear?

@DHowett-MSFT commented on GitHub (Apr 6, 2020): This could be us scanning the entire 9001-line buffer for words. @codeofdusk If you change the buffer size from 120x9001 to 120x50 (in the legacy preferences panel), does the slowdown disappear?
Author
Owner

@codeofdusk commented on GitHub (Apr 6, 2020):

This could be us scanning the entire 9001-line buffer for words. @codeofdusk If you change the buffer size from 120x9001 to 120x50 (in the legacy preferences panel), does the slowdown disappear?

Enabling "use legacy console" in properties completely disables UIA. The "buffer size" is already set to 50, should it be something else?

@codeofdusk commented on GitHub (Apr 6, 2020): > This could be us scanning the entire 9001-line buffer for words. @codeofdusk If you change the buffer size from 120x9001 to 120x50 (in the legacy preferences panel), does the slowdown disappear? Enabling "use legacy console" in properties completely disables UIA. The "buffer size" is already set to 50, should it be something else?
Author
Owner

@codeofdusk commented on GitHub (Apr 6, 2020):

This could be us scanning the entire 9001-line buffer for words. @codeofdusk If you change the buffer size from 120x9001 to 120x50 (in the legacy preferences panel), does the slowdown disappear?

Enabling "use legacy console" in properties completely disables UIA. The "buffer size" is already set to 50, should it be something else?

Changing the buffer size from 50 to 500 has no effect.

@codeofdusk commented on GitHub (Apr 6, 2020): > > This could be us scanning the entire 9001-line buffer for words. @codeofdusk If you change the buffer size from 120x9001 to 120x50 (in the legacy preferences panel), does the slowdown disappear? > > Enabling "use legacy console" in properties completely disables UIA. The "buffer size" is already set to 50, should it be something else? Changing the buffer size from 50 to 500 has no effect.
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 6, 2020):

Ah, sorry, I meant the "traditional" console properties sheet. No need to actually check the "legacy" checkbox. That one switches back to the console host from Windows 8.1 before we renewed our work on it 😄

Just to confirm, you've got 50 or 500 in the box where I've got 9001:?

image

@DHowett-MSFT commented on GitHub (Apr 6, 2020): Ah, sorry, I meant the "traditional" console properties sheet. No need to actually check the "legacy" checkbox. That one switches back to the console host from Windows 8.1 before we renewed our work on it :smile: Just to confirm, you've got 50 or 500 in the box where I've got 9001:? ![image](https://user-images.githubusercontent.com/14316954/78512503-ecfcb300-7759-11ea-92c4-eaf804ed740c.png)
Author
Owner

@codeofdusk commented on GitHub (Apr 6, 2020):

Ah, sorry, I meant the "traditional" console properties sheet. No need to actually check the "legacy" checkbox. That one switches back to the console host from Windows 8.1 before we renewed our work on it 😄

Just to confirm, you've got 50 or 500 in the box where I've got 9001:?

image

It looks like you've got an image with the alt text "image", what is this?

@codeofdusk commented on GitHub (Apr 6, 2020): > Ah, sorry, I meant the "traditional" console properties sheet. No need to actually check the "legacy" checkbox. That one switches back to the console host from Windows 8.1 before we renewed our work on it 😄 > > Just to confirm, you've got 50 or 500 in the box where I've got 9001:? > > ![image](https://user-images.githubusercontent.com/14316954/78512503-ecfcb300-7759-11ea-92c4-eaf804ed740c.png) It looks like you've got an image with the alt text "image", what is this?
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 6, 2020):

Sorry about that. It is a screenshot of the console properties page. The window is titled, "C:\windows\system32\cmd.exe properties"; there's a tab control with "Layout" selected as the active tab. There are three frames inside the tab control:

  • Screen Buffer Size
  • Window Size
  • Window Position

The Screen Buffer Size frame contains the label "Width" and a disabled spinner box containing the number 111; the label "Height" and an enabled spinner box containing the number 9001; and a ticked checkbox labelled "Wrap text output on resize."

There's another similar frame below Screen Buffer Size which is titled "Window Size". Since it's not the frame I am interested in, its contents are not meaningful right now.

(This is a great learning experience for me, and I apologize for providing inaccessible images. 😄)

@DHowett-MSFT commented on GitHub (Apr 6, 2020): Sorry about that. It is a screenshot of the console properties page. The window is titled, "C:\windows\system32\cmd.exe properties"; there's a tab control with "Layout" selected as the active tab. There are three frames inside the tab control: * Screen Buffer Size * Window Size * Window Position The Screen Buffer Size frame contains the label "Width" and a disabled spinner box containing the number 111; the label "Height" and an enabled spinner box containing the number 9001; and a ticked checkbox labelled "Wrap text output on resize." There's another similar frame below Screen Buffer Size which is titled "Window Size". Since it's not the frame I am interested in, its contents are not meaningful right now. (This is a great learning experience for me, and I apologize for providing inaccessible images. :smile:)
Author
Owner

@codeofdusk commented on GitHub (Apr 6, 2020):

Sorry about that. It is a screenshot of the console properties page. The window is titled, "C:\windows\system32\cmd.exe properties"; there's a tab control with "Layout" selected as the active tab. There are three frames inside the tab control:

  • Screen Buffer Size
  • Window Size
  • Window Position

The Screen Buffer Size frame contains the label "Width" and a disabled spinner box containing the number 111; the label "Height" and an enabled spinner box containing the number 9001; and a ticked checkbox labelled "Wrap text output on resize."

There's another similar frame below Screen Buffer Size which is titled "Window Size". Since it's not the frame I am interested in, its contents are not meaningful right now.

(This is a great learning experience for me, and I apologize for providing inaccessible images. 😄)

Oh I see now. Yeah I have 9001 there. Testing.

@codeofdusk commented on GitHub (Apr 6, 2020): > Sorry about that. It is a screenshot of the console properties page. The window is titled, "C:\windows\system32\cmd.exe properties"; there's a tab control with "Layout" selected as the active tab. There are three frames inside the tab control: > > * Screen Buffer Size > * Window Size > * Window Position > > The Screen Buffer Size frame contains the label "Width" and a disabled spinner box containing the number 111; the label "Height" and an enabled spinner box containing the number 9001; and a ticked checkbox labelled "Wrap text output on resize." > > There's another similar frame below Screen Buffer Size which is titled "Window Size". Since it's not the frame I am interested in, its contents are not meaningful right now. > > (This is a great learning experience for me, and I apologize for providing inaccessible images. 😄) Oh I see now. Yeah I have 9001 there. Testing.
Author
Owner

@codeofdusk commented on GitHub (Apr 6, 2020):

Sorry about that. It is a screenshot of the console properties page. The window is titled, "C:\windows\system32\cmd.exe properties"; there's a tab control with "Layout" selected as the active tab. There are three frames inside the tab control:

  • Screen Buffer Size
  • Window Size
  • Window Position

The Screen Buffer Size frame contains the label "Width" and a disabled spinner box containing the number 111; the label "Height" and an enabled spinner box containing the number 9001; and a ticked checkbox labelled "Wrap text output on resize."
There's another similar frame below Screen Buffer Size which is titled "Window Size". Since it's not the frame I am interested in, its contents are not meaningful right now.
(This is a great learning experience for me, and I apologize for providing inaccessible images. 😄)

Oh I see now. Yeah I have 9001 there. Testing.

Yes slowdown is gone when I change it to 50.

@codeofdusk commented on GitHub (Apr 6, 2020): > > Sorry about that. It is a screenshot of the console properties page. The window is titled, "C:\windows\system32\cmd.exe properties"; there's a tab control with "Layout" selected as the active tab. There are three frames inside the tab control: > > > > * Screen Buffer Size > > * Window Size > > * Window Position > > > > The Screen Buffer Size frame contains the label "Width" and a disabled spinner box containing the number 111; the label "Height" and an enabled spinner box containing the number 9001; and a ticked checkbox labelled "Wrap text output on resize." > > There's another similar frame below Screen Buffer Size which is titled "Window Size". Since it's not the frame I am interested in, its contents are not meaningful right now. > > (This is a great learning experience for me, and I apologize for providing inaccessible images. 😄) > > Oh I see now. Yeah I have 9001 there. Testing. Yes slowdown is gone when I change it to 50.
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 6, 2020):

This is excellent news. Thank you. @carlos-zamora, I believe we chatted about this. Because conhost doesn't know where the "actual" bottom of the text is, it scans forward almost 120x9001 characters to find out that the buffer consists of nothing but spaces. This is the optimization we talked about with Michael where totally empty rows could be skipped as containing "only spaces".

@DHowett-MSFT commented on GitHub (Apr 6, 2020): This is excellent news. Thank you. @carlos-zamora, I believe we chatted about this. Because conhost doesn't know where the "actual" bottom of the text is, it scans forward almost 120x9001 characters to find out that the buffer consists of nothing but spaces. This is the optimization we talked about with Michael where totally empty rows could be skipped as containing "only spaces".
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 6, 2020):

(The reason conhost doesn't know where the actual bottom of the buffer is is because a Win32 application can "address" the entire 9001 lines, even if they are not visible. It was a huge mistake to give win32 applications control over the entire buffer outside of the viewport, but it is a burden we need to live with.)

@DHowett-MSFT commented on GitHub (Apr 6, 2020): (The reason conhost doesn't know where the actual bottom of the buffer is is because a Win32 application can "address" the entire 9001 lines, even if they are not visible. It was a huge mistake to give win32 applications control over the entire buffer outside of the viewport, but it is a burden we need to live with.)
Author
Owner

@carlos-zamora commented on GitHub (Apr 6, 2020):

Makes sense. Aside from that change, I’d be happy to do some more WPR traces on ConHost’s word navigation model. It’d be pretty fun actually haha

@carlos-zamora commented on GitHub (Apr 6, 2020): Makes sense. Aside from that change, I’d be happy to do some more WPR traces on ConHost’s word navigation model. It’d be pretty fun actually haha
Author
Owner

@carlos-zamora commented on GitHub (Sep 17, 2021):

Closing as a part of #7000 (particularly closed by #6986)

@carlos-zamora commented on GitHub (Sep 17, 2021): Closing as a part of #7000 (particularly closed by #6986)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7285