Related to #11533
Note, this issue is meant to provide a more technical background to #11533, since the issue is broader than just VS Code alone, toch likely to be less prevalent in other software. Please refrain from discussing VS Code specific cases in this issue, go to #11533 instead. Having said that, ideally a pull request would close both this issue and #11533 in one go.
Steps to reproduce:
- Open a file in VS Code
- Walk through/edit text
- In browse mode settings, disable "Enable browse mode on page load"
- Restart NVDA
- Open a file in VS Code
- Walk through/edit text
Actual behavior:
Performance for step 5 and 6 turns out to be significantly better than for step 1 and 2.
Expected behavior:
Performance for step 5 and 6 should be equal to performance for step 1 and 2.
Extra details
For Visual Studio code, loading the application creates a virtual buffer for the application root. Almost everything in VS Code is running outside this virtual buffer. Yet, for every event in code, especially these caused by changing the caret position, the contains method on the vbuf is executed for the object. As many predicates are passing before NVDA determines that the object doesn't belong to the virtual buffer, this seems to slow down things majorly.
While investigating this, it turns out that the vbuf object is queried like this even when changing focus or caret, e.g. in NotePad++.
System configuration
NVDA installed/portable/running from source:
Installed
NVDA version:
alpha-20982
Windows version:
Windows 10 2004
Name and version of other software in use when reproducing the issue:
Visual Studio Code 1.49.1
Other questions
Does the issue still occur after restarting your computer?
Yes
Have you tried any other versions of NVDA? If so, please report their behaviors.
n/a
If addons are disabled, is your problem still occuring?
Yes
Did you try to run the COM registry fixing tool in NVDA menu / tools?
n/a
Related to #11533
Note, this issue is meant to provide a more technical background to #11533, since the issue is broader than just VS Code alone, toch likely to be less prevalent in other software. Please refrain from discussing VS Code specific cases in this issue, go to #11533 instead. Having said that, ideally a pull request would close both this issue and #11533 in one go.
Steps to reproduce:
Actual behavior:
Performance for step 5 and 6 turns out to be significantly better than for step 1 and 2.
Expected behavior:
Performance for step 5 and 6 should be equal to performance for step 1 and 2.
Extra details
For Visual Studio code, loading the application creates a virtual buffer for the application root. Almost everything in VS Code is running outside this virtual buffer. Yet, for every event in code, especially these caused by changing the caret position, the contains method on the vbuf is executed for the object. As many predicates are passing before NVDA determines that the object doesn't belong to the virtual buffer, this seems to slow down things majorly.
While investigating this, it turns out that the vbuf object is queried like this even when changing focus or caret, e.g. in NotePad++.
System configuration
NVDA installed/portable/running from source:
Installed
NVDA version:
alpha-20982
Windows version:
Windows 10 2004
Name and version of other software in use when reproducing the issue:
Visual Studio Code 1.49.1
Other questions
Does the issue still occur after restarting your computer?
Yes
Have you tried any other versions of NVDA? If so, please report their behaviors.
n/a
If addons are disabled, is your problem still occuring?
Yes
Did you try to run the COM registry fixing tool in NVDA menu / tools?
n/a