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

Unnecessary large screen update under Remote Desktop #164503

Open
xinyanmsft opened this issue Oct 24, 2022 · 2 comments
Open

Unnecessary large screen update under Remote Desktop #164503

xinyanmsft opened this issue Oct 24, 2022 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug chromium Issues and items related to Chromium perf under-discussion Issue is under discussion for relevance, priority, approach upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@xinyanmsft
Copy link

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.72.2
  • OS Version: Windows 11, 22H2

We (Microsoft DevBox service, https://azure.microsoft.com/en-us/products/dev-box) found this issue while performing test with Remote Desktop team. We found out for simple text edit scenarios, VSCode made larger screen update than necessary. This means Remote Desktop needs to encode and decode a much larger area than necessary, introducing additional input latency (the time betweeon one types a character and when one sees the UI update).

The test scenario:

  1. Create a new txt file with VSCode, and type some text such as "hello world".
  2. Set the cursor to the end of the line.
  3. Press 'Enter'

When running this scenario under remote desktop with internal tooling to track screen update, we found when the 'Enter' key is pressed, VSCode made unnecessary large screen area update. With the attached screenshot, the update area is (left 421, top 108, right 2560, bottom 1381), about the size of the entire editor. Ideally only the area around the text and the scroll bar should be updated.

Attach screenshot. I expect only the yellow rectangles are updated, but the entire editor was updated.

screenshot

The tool to track UI update area is internal, and I can't post it here. Please contact me (xinyan @ microsoft.com) for tool's location and instruction. Thanks!

@jrieken jrieken assigned deepak1556 and alexdima and unassigned jrieken Oct 25, 2022
@alexdima alexdima added the perf label Oct 25, 2022
@alexdima alexdima added this to the October 2022 milestone Oct 25, 2022
@alexdima alexdima added the under-discussion Issue is under discussion for relevance, priority, approach label Oct 25, 2022
@aeschli aeschli modified the milestones: October 2022, November 2022 Oct 27, 2022
@deepak1556 deepak1556 added bug Issue identified by VS Code Team member as probable bug upstream Issue identified as 'upstream' component related (exists outside of VS Code) chromium Issues and items related to Chromium labels Dec 13, 2022
@deepak1556 deepak1556 modified the milestones: January 2023, On Deck Jan 24, 2023
@alexdima
Copy link
Member

alexdima commented Aug 23, 2023

I've taken the following recording using Paint Flashing (Developer Tools > Rendering > Paint Flashing)

Kapture 2023-08-23 at 16 40 06

The following 2 frames show what we're changing in the DOM which triggers Chromium to repaint:

image image

So, we are logically only touching the strictly necessary dom elements. I speculate that Chromium might be creating an encompassing rectangle around all these smaller rectangles and updating the entire region. I can't say why they would behave this way.

I speculate that configuring "editor.scrollbar.vertical": "hidden" and right clicking in the status bar and unchecking "Editor Selection" might reduce the paint region since the scrollbar rectangle and the status bar rectangle wouldn't be needed to be repainted.

@xinyanmsft Given we can run in browsers via vscode.dev, do you observe a similar behavior in Edge and in Firefox? If Firefox behaves differently and if we can provide necessary tooling to the Chromium project maintainers, we could report this upstream to their issue tracker at https://bugs.chromium.org/p/chromium/issues/list

@deepak1556
Copy link
Collaborator

Given we can run in browsers via vscode.dev, do you observe a similar behavior in Edge and in Firefox? If Firefox behaves differently and if we can provide necessary tooling to the Chromium project maintainers, we could report this upstream to their issue tracker at https://bugs.chromium.org/p/chromium/issues/list

@xinyanmsft were you able to make progress on this, let me know if I can help here.

@deepak1556 deepak1556 removed this from the On Deck milestone Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug chromium Issues and items related to Chromium perf under-discussion Issue is under discussion for relevance, priority, approach upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

6 participants