Terminal: UIA: delay when reaching prompt with word navigation

Created on 5 Apr 2020  路  12Comments  路  Source: microsoft/terminal

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.

Area-Accessibility In-PR Issue-Bug Priority-1 Product-Conhost

Most helpful comment

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:)

All 12 comments

Cc @carlos-zamora.

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?

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?

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.

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

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?

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:)

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.

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.

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

(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.)

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

migueldeicaza picture migueldeicaza  路  58Comments

privacyguy123 picture privacyguy123  路  131Comments

NOFUNEVER picture NOFUNEVER  路  63Comments

yanglr picture yanglr  路  235Comments

NOFUNEVER picture NOFUNEVER  路  106Comments