Gecko VBufBackend: greatly speed up subtree re-renders when part of a document has changed#8678
Conversation
…pen when moving nodes with javascript.
| VBufBackendSet_t VBufBackend_t::runningBackends; | ||
|
|
||
| VBufBackend_t::VBufBackend_t(int docHandleArg, int IDArg): renderThreadID(GetWindowThreadProcessId((HWND)UlongToHandle(docHandleArg),NULL)), rootDocHandle(docHandleArg), rootID(IDArg), lock(), renderThreadTimerID(0), invalidSubtreeList() { | ||
| VBufBackend_t::VBufBackend_t(int docHandleArg, int IDArg): renderThreadID(GetWindowThreadProcessId((HWND)UlongToHandle(docHandleArg),NULL)), rootDocHandle(docHandleArg), rootID(IDArg), lock(), renderThreadTimerID(0), pendingInvalidSubtreesList() { |
There was a problem hiding this comment.
nit: We initialise pendingInvalidSubtreesList here, but not workingInvalidSubtreesList. It'd be good to be consistent here. I don't think they need to be initialised because they're C++ types and thus have a defined initial state.
| break; | ||
| } else if(isDescendantNode(node,existingNode)) { //A descedndant has been invalidated | ||
| LOG_DEBUG(L"removing a descendant node from the invalid nodes"); | ||
| //Remove the old descendant |
There was a problem hiding this comment.
We no longer remove descendants in invalidateSubtree. That's fine for gecko_ia2 because while rendering a parent, reuseExistingNode will un-invalidate a child node if it isn't reused. If it's a grandchild or deeper, we do want update to re-render it anyway. However, this is problematic for other backends which don't use reuseExistingNode because they always re-render all descendants in fillVBuf, but those descendants will then get re-rendered again by update. Either:
- reuseExistingNode must be used by all backends. This means fixing the bugs with mshtml. As discussed, this is probably due to updateAncestor.
- This new behaviour of invalidateSubtree where it keeps descendants must only be used for gecko_ia2.
Option 1 is preferable, but failing that, option 2 will be necessary.
| LOG_DEBUG(L"subtree node has docHandle "<<docHandle<<L" and ID "<<ID); | ||
| LOG_DEBUG(L"Rendering content"); | ||
| render(tempBuf,docHandle,ID,node); | ||
| render(tempBuf,docHandle,ID,node); |
There was a problem hiding this comment.
nit: A pesky trailing tab got added here.
| // This existing node was not marked as invalid, therefore it can be re-used. | ||
| return existingNode; | ||
| } else { | ||
| // this existing node was marked as invalid also, therefore we can re-render it here anyway. |
There was a problem hiding this comment.
This comment is a bit confusing. Perhaps: "This existing node was marked as invalid, so the caller must now re-render it."
| // Node not known | ||
| return; | ||
| } | ||
| if(i->second==node) { |
There was a problem hiding this comment.
These two asserts have been converted into if checks. Is there any reason these cases should now be happening in normal operation where they didn't before? If not, this change should be removed.
| m.erase(i++); | ||
| continue; | ||
| } | ||
| for(auto i=buffer->referenceNodes.rbegin();i!=buffer->referenceNodes.rend();++i) { |
There was a problem hiding this comment.
Can we please have a comment explaining why this is iterated in reverse?
| return this->nodes.count(node)?true:false; | ||
| } | ||
|
|
||
| bool VBufStorage_buffer_t::moveSubtree(VBufStorage_fieldNode_t* node, VBufStorage_controlFieldNode_t* newParent, VBufStorage_fieldNode_t* newPrevious) { |
There was a problem hiding this comment.
This method isn't used by these changes and should be removed (or used in replaceSubtrees).
| /** | ||
| * uniquely identifies this control in its buffer. | ||
| */ | ||
| const VBufStorage_controlFieldNodeIdentifier_t identifier; |
There was a problem hiding this comment.
Any reason this is now public where it was previously protected?
|
|
||
| /** | ||
| * Unlinks this node from its parent and siblings. | ||
| * Note that this does not delete not enode, nore unregister it from the buffer in any other way. |
There was a problem hiding this comment.
typo: "not enode" -> "node"?
| /** | ||
| * Unlinks this node from its parent and siblings. | ||
| * Note that this does not delete not enode, nore unregister it from the buffer in any other way. | ||
| * This is used internally by removeFieldNode and moveSubtree. |
There was a problem hiding this comment.
If you do remove moveSubtree, be sure to update this comment.
|
Hi to be honest as a user of waterfox64, I see not much difference, but then
I believe waterfox uses a different engine to the latest Firefox, which I
still cannot get reliably to work on my windows 7 machine, and I know a lot
of folk are using waterfox now, probably for this reason.
Incidentally this version of nvda is chucking out add ons with errors at
start time, I'm assuming this is due to some lack of support for updating
stuff and maybe older add ons.
Brian
bglists@blueyonder.co.uk
Sent v
|
|
@jcsteh gave me this try build to test, and I found a possible regression. Under some circumstances, links become duplicated, and this is not reproducible in a current Alpha build. The only way I have so far been able to reproduce this is as follows:
Result: The General link appears once, the Instances and About links appear twice. Likewise if you activate the Instances link, after the updated UI, the instance name and Add Another instance links appear twice as well. |
|
The Bugzilla-ID is Bug 1473310. (I'm that guy from Austria.) Here are the log files with NVDA 2018.1 (installed) and with try-15940 (portable). Firefox 61.0.2 was running on the same USB 3.0 flash drive as the NVDA try build. In NVDA 2018.1 the cursor jumped suddenly around even no key was pressed and in try 15940 the "mouse hover" information disappear "immediately" after the cursor left of the link and was moved to the bottom of the document (Liste der Tatort-Folgen). The loading time when jumping from link to link was quite reduced in the try build in compare with NVDA 2018.1 as well as the huge lagging situation after switching back to Firefox. As Firefox 61.0.2 was running from an USB flash drive, I don't want to compare the initialling loading time (= first load of this wiki article) with Firefox 56.0.2 which is still installed on a SSD. System: Win7x64 on a SSD, Intel Core i7-960, 6 GB RAM. btw: Next time I must copy my "gestures.ini" into the portable copies of NVDA. It is really horrible for me to use NVDA without this. ;) |
|
Slightly off topic, but please note that running Firefox without it being
installed (including "portable" copies) will result in extreme performance
degradation for accessibility. Unfortunately, there is nothing we can do
about this. The Windows COM functionality we are using to optimise
performance requires entries to be placed in the system registry; there is
no way around this.
|
|
In try-15940 (portable version) I noticed that the whole update check checkboxes (including that one for the additional stats) disappeared in the General NVDA Settings. furthermore the menu item "Check for updates..." (or like this) in the NVDA Help menu has also been gone in the portable version of this build. This issue doesn't appeared in 2018.3 Beta 3. So I think it's better to ask here about these new strange things than opening a new issue especially for it. alpha-15933 wasn't tested. |
|
Try builds don't support automatic updates, since there's no equivalent
"new version" of the same type to update to. Thus, everything related to
automatic updates is disabled.
|
…ender with requiresUparentUpdate and allowReuseInAncestorUpdate properties.
|
After having run with this try build for days, except for the doubled links issue in that one instance I described above, and a table update issue I discussed with @jcsteh, I have not found any other problems with it. My current illness having reduced my computer time significantly not withstanding. But I would give this a thumbs up. |
|
@jcsteh and I found a few other issues, including row and column numbers
becoming out of order if rows are inserted.
I then tried ensuring that we re-render as much of a table to ensure
that row and column numbers stay correct, but that then made the German
wikipedia article become slower again, introducing a few 5 second lags
after the initial render.
I think we would be best no longer filling in row and column numbers /
spans / headers in the vbufBackend and instead find them at runtime in
NVDA's process.
|
OK, then it would probably be best if we tried caching these in the handler in Firefox in the future, or? |
|
If we're fetching them in NVDA's process (out-proc), no point in handler caching, since the handler is only used in Firefox's parent process. Out-proc clients don't get handler caching.
|
…ke sure to rerender any part of the table after that. E.g. If a row is added, then all rows after that also need to be re-rendered.
…all re-rendered if a node has been given alternative text because the node had no useful descendants (E.g. an empty link).
…ch gecko_ia2 virtualBuffer from AccessibleObjectFromEvent to accChild for getNVDAObjectFromIdentifier.
|
Okay. Another try build: I spent some more time on this so that if part of a table changes, all parts of the table following the change are also re-rendered, keeping row and column coordinates accurate. This again has the German Wikipedia page not blocking on updates. I have also managed to fix the pinafore double link problem. I actually have a feeling that Gecko is not firing a needed winEvent on the span inside the link when it gains a textNode... though I can't be completely sure. A lot more review required I'm sure, as another 2 properties have been added to VbufStorage_controlFieldNode_t. |
…rks with Google Chrome.
|
Hi @michaelDCurran, you wrote:
I still see this in the latest Try build. The Pinafore Instances, About links in Settings, and once you open Instances, the Instance name links are still being duplicated in the buffer. This is with Firefox (now 64) Nightly, but also 62 release and 63 beta. |
…iblings have changed, only if a node's denyReuseIfPreviousSiblingsChanged property is actually set (woops). Also, remove ensureDescendantsRequireParentUpdate method and replace it with a alwaysRerenderDescendants property instead.
7a45337 to
e42f93b
Compare
|
Here is yet another try build:
https://ci.appveyor.com/api/buildjobs/bkibq94kuatm9aal/artifacts/output%2Fnvda_snapshot_try-vbufPartialRender-16004%2Ce42f93b9.exe
On my system that link is certainly not being duplicated now.
Also some further speed improvements perhaps.
|
I am happy to report that the latest try build fixes the duplicate links for me as well, thanks @michaelDCurran! :) |
|
Hi @michaelDCurran, is there a new try build by chance? |
|
I just earlier encountered a freeze in the Skype 8 Electron app while navigating back via landmarks. The freeze required me to kill NVDA and also the Skype app. Not 100% reproducible. The log from the start of me hitting Shift+D is: Input: kb(laptop):shift+d WARNING - watchdog.watcher (10:04:46.677): |
| // Set some properties to ensure that this and other nodes in the table aare correctly re-rendered if the table changes, | ||
| // so that the table's row and column cordinates remain accurate. | ||
| // setting denyReuseIfPreviousSiblingsChange ensures that if any part of the table is added or removed previous to this node, | ||
| // his node will not be reused (as its row / column coordinates would now be out of date). |
| // setting requiresParentUpdate ensures that if this node is specifically invalidated, | ||
| // its parent will also be invalidated. | ||
| // For example, if this is a table row, its rerendering may change the number of cells inside. | ||
| // this in tern would affect the coordinates of all table cells in table rows after this row. |
| if(!paccTableCell) { // just rows and row groups | ||
| // setting requiresParentUpdate ensures that if this node is specifically invalidated, | ||
| // its parent will also be invalidated. | ||
| // For example, if this is a table row, its rerendering may change the number of cells inside. |
There was a problem hiding this comment.
Re-rendering a table row wouldn't change subsequent table row coordinates. However, this does apply to row groups, so you can just change the comment here (and on the next line) to reflect that.
| } | ||
| if(previousControlFieldNode!=previousExistingControlFieldNode) { | ||
| // The previous node differs from the existing previous node. | ||
| // We already know its not because a node was added, therefore this must be either a removal or a move. |
|
I updated to alpha-16103,a04a4ceb early yesterday on Windows 10 insider 17763. I’m getting significant number of errors after launching Firefox. Errors persist in launching other dialogs and applications after Firefox is launched. I’m attaching the debug log. I created this with all addons disabled. I can provide the full log of the session if you need. I’ve removed headers and footers.
I believe the errors may be related to this PR. But I’m happy to create another ticket if it’s not. Please let me know.
IO - inputCore.InputManager.executeGesture (01:09:53.553):
Input: kb(laptop):windows+8
IO - speech.speak (01:09:53.601):
Speaking [LangChangeCommand (u'en_US'), u'Taskbar']
DEBUG - synthDrivers.oneCore.SynthDriver._processQueue (01:09:53.607):
Begin processing speech
DEBUG - synthDrivers.oneCore.SynthDriver._callback (01:09:53.622):
Done pushing audio
DEBUG - synthDrivers.oneCore.SynthDriver._processQueue (01:09:53.622):
Calling idle on audio player
DEBUG - synthDrivers.oneCore.SynthDriver._processQueue (01:09:54.056):
Queue empty, done processing
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IA2WindowHandle (01:09:54.625):
IAccessible2::windowHandle failed: (-2147220995, 'Object is not connected to server', (None, None, None, 0, None))
DEBUGWARNING - watchdog._watcher (01:09:54.640):
Trying to recover from freeze, core stack:
File "nvda.pyw", line 217, in <module>
File "core.pyc", line 515, in main
File "wx\core.pyc", line 2134, in MainLoop
File "gui\__init__.pyc", line 963, in Notify
File "core.pyc", line 485, in run
File "IAccessibleHandler.pyc", line 900, in pumpAll
File "IAccessibleHandler.pyc", line 757, in processForegroundWinEvent
File "IAccessibleHandler.pyc", line 532, in winEventToNVDAEvent
File "NVDAObjects\IAccessible\__init__.pyc", line 44, in getNVDAObjectFromEvent
File "NVDAObjects\__init__.pyc", line 72, in __call__
File "NVDAObjects\IAccessible\__init__.pyc", line 569, in __init__
File "IAccessibleHandler.pyc", line 917, in getIAccIdentity
File "comtypes\__init__.pyc", line 1160, in QueryInterface
DEBUGWARNING - core.CorePump.run (01:09:54.655):
errors in this core pump cycle
Traceback (most recent call last):
File "core.pyc", line 485, in run
File "IAccessibleHandler.pyc", line 900, in pumpAll
File "IAccessibleHandler.pyc", line 757, in processForegroundWinEvent
File "IAccessibleHandler.pyc", line 532, in winEventToNVDAEvent
File "NVDAObjects\IAccessible\__init__.pyc", line 44, in getNVDAObjectFromEvent
File "NVDAObjects\__init__.pyc", line 72, in __call__
File "watchdog.pyc", line 202, in _COMError_init
CallCancelled
INFO - config.ConfigManager._loadConfig (01:09:55.157):
Loading config: C:\Users\Pratik Patel\AppData\Roaming\nvda\profiles\Mozilla.ini
DEBUG - config.profileUpgrader.upgrade (01:09:55.171):
Current config schema version: 2, latest: 2
DEBUG - fileUtils.FaultTolerantFile (01:09:55.171):
C:\Users\Pratik Patel\AppData\Roaming\nvda\profiles\Mozilla.iniawufzo.tmp
INFO - config.ConfigManager._loadConfig (01:09:55.187):
Config loaded (after upgrade, and in the state it will be used by NVDA):
{u'schemaVersion': u'2', u'speech': {u'oneCore': {u'rate': u'35', u'beepForCapitals': u'True'}}, u'wintenApps': {u'updateCheckTime': u'1537384275'}}
ERROR - eventHandler.executeEvent (01:09:55.190):
error executing event: gainFocus on <NVDAObjects.IAccessible.mozilla.Mozilla object at 0x07614190> with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 150, in executeEvent
File "eventHandler.pyc", line 163, in doPreGainFocus
File "api.pyc", line 138, in setFocusObject
File "appModuleHandler.pyc", line 291, in handleAppSwitch
File "contextlib.pyc", line 24, in __exit__
File "config\__init__.pyc", line 711, in atomicProfileSwitch
File "config\__init__.pyc", line 374, in _handleProfileSwitch
File "config\__init__.pyc", line 943, in dict
File "config\__init__.pyc", line 941, in dict
File "config\__init__.pyc", line 864, in __getitem__
KeyError: u'x'
DEBUGWARNING - watchdog._watcher (01:09:55.782):
Trying to recover from freeze, core stack:
File "nvda.pyw", line 217, in <module>
File "core.pyc", line 515, in main
File "wx\core.pyc", line 2134, in MainLoop
File "gui\__init__.pyc", line 963, in Notify
File "core.pyc", line 486, in run
File "queueHandler.pyc", line 86, in pumpAll
File "queueHandler.pyc", line 50, in flushQueue
File "comtypesMonkeyPatches.pyc", line 54, in newCpbDel
File "comtypes\__init__.pyc", line 919, in __del__
File "comtypes\__init__.pyc", line 1174, in Release
DEBUGWARNING - watchdog._watcher (01:09:56.283):
Trying to recover from freeze, core stack:
File "nvda.pyw", line 217, in <module>
File "core.pyc", line 515, in main
File "wx\core.pyc", line 2134, in MainLoop
File "gui\__init__.pyc", line 963, in Notify
File "core.pyc", line 486, in run
File "queueHandler.pyc", line 86, in pumpAll
File "queueHandler.pyc", line 53, in flushQueue
File "eventHandler.pyc", line 62, in _queueEventCallback
File "eventHandler.pyc", line 150, in executeEvent
File "eventHandler.pyc", line 163, in doPreGainFocus
File "api.pyc", line 107, in setFocusObject
File "baseObject.pyc", line 34, in __get__
File "baseObject.pyc", line 115, in _getPropertyViaCache
File "NVDAObjects\__init__.pyc", line 496, in _get_container
File "baseObject.pyc", line 34, in __get__
File "baseObject.pyc", line 115, in _getPropertyViaCache
File "NVDAObjects\IAccessible\mozilla.pyc", line 55, in _get_parent
File "IAccessibleHandler.pyc", line 449, in accNavigate
File "comtypes\automation.pyc", line 506, in __ctypes_from_outparam__
File "comtypesMonkeyPatches.pyc", line 64, in newVARIANT_value_fget
File "comtypes\automation.pyc", line 431, in _get_value
File "comtypes\client\dynamic.pyc", line 28, in Dispatch
File "comtypes\automation.pyc", line 699, in GetTypeInfo
File "comtypesMonkeyPatches.pyc", line 70, in newGetTypeInfo
DEBUGWARNING - eventHandler.executeEvent (01:09:56.345):
error executing event: gainFocus on <NVDAObjects.IAccessible.mozilla.Mozilla object at 0x074DAE50> with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 150, in executeEvent
File "eventHandler.pyc", line 163, in doPreGainFocus
File "api.pyc", line 107, in setFocusObject
File "baseObject.pyc", line 34, in __get__
File "baseObject.pyc", line 115, in _getPropertyViaCache
File "NVDAObjects\__init__.pyc", line 496, in _get_container
File "baseObject.pyc", line 34, in __get__
File "baseObject.pyc", line 115, in _getPropertyViaCache
File "NVDAObjects\IAccessible\mozilla.pyc", line 55, in _get_parent
File "IAccessibleHandler.pyc", line 449, in accNavigate
File "comtypes\automation.pyc", line 506, in __ctypes_from_outparam__
File "comtypesMonkeyPatches.pyc", line 64, in newVARIANT_value_fget
File "comtypes\automation.pyc", line 431, in _get_value
File "watchdog.pyc", line 202, in _COMError_init
CallCancelled
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (01:09:56.510):
accRole failed: (-2147024809, 'The parameter is incorrect.', (None, None, None, 0, None))
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (01:09:57.417):
accRole failed: (-2147024809, 'The parameter is incorrect.', (None, None, None, 0, None))
DEBUG - treeInterceptorHandler.update (01:09:58.638):
Adding new treeInterceptor to runningTable: <virtualBuffers.gecko_ia2.Gecko_ia2 object at 0x03824630>
ERROR - eventHandler.executeEvent (01:09:58.638):
error executing event: gainFocus on <baseObject.Dynamic_BrokenFocusedStateDocumentMozillaIAccessible object at 0x075F3F70> with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 150, in executeEvent
File "eventHandler.pyc", line 163, in doPreGainFocus
File "api.pyc", line 138, in setFocusObject
File "appModuleHandler.pyc", line 291, in handleAppSwitch
File "contextlib.pyc", line 35, in __exit__
File "config\__init__.pyc", line 711, in atomicProfileSwitch
File "config\__init__.pyc", line 374, in _handleProfileSwitch
File "config\__init__.pyc", line 943, in dict
File "config\__init__.pyc", line 941, in dict
File "config\__init__.pyc", line 864, in __getitem__
KeyError: u'x'
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (01:09:58.989):
accRole failed: (-2147024809, 'The parameter is incorrect.', (None, None, None, 0, None))
IO - speech.speak (01:09:59.644):
Speaking [LangChangeCommand (u'en_US'), u'Loading document...']
DEBUG - synthDrivers.oneCore.SynthDriver._processQueue (01:09:59.651):
Begin processing speech
DEBUG - synthDrivers.oneCore.SynthDriver._callback (01:09:59.667):
Done pushing audio
DEBUG - synthDrivers.oneCore.SynthDriver._processQueue (01:09:59.667):
Calling idle on audio player
DEBUG - synthDrivers.oneCore.SynthDriver._processQueue (01:10:00.233):
Queue empty, done processing
DEBUG - virtualBuffers.VirtualBuffer._loadBuffer (01:10:02.457):
Buffer load took 3.818 sec, 162617 chars
DEBUG - synthDrivers.oneCore.SynthDriver.cancel (01:10:10.951):
Cancelling
IO - inputCore.InputManager.executeGesture (01:10:10.973):
Input: kb(laptop):alt+tab
ERROR - eventHandler.executeEvent (01:10:11.005):
error executing event: gainFocus on <NVDAObjects.IAccessible.ContentGenericClient object at 0x03C102F0> with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 150, in executeEvent
File "eventHandler.pyc", line 163, in doPreGainFocus
File "api.pyc", line 138, in setFocusObject
File "appModuleHandler.pyc", line 291, in handleAppSwitch
File "contextlib.pyc", line 24, in __exit__
File "config\__init__.pyc", line 711, in atomicProfileSwitch
File "config\__init__.pyc", line 374, in _handleProfileSwitch
File "config\__init__.pyc", line 943, in dict
File "config\__init__.pyc", line 941, in dict
File "config\__init__.pyc", line 864, in __getitem__
KeyError: u'x'
ERROR - eventHandler.executeEvent (01:10:11.052):
error executing event: gainFocus on <baseObject.Dynamic_MultitaskingViewFrameListItemListItemUIA object at 0x074DAE50> with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 150, in executeEvent
File "eventHandler.pyc", line 163, in doPreGainFocus
File "api.pyc", line 138, in setFocusObject
File "appModuleHandler.pyc", line 291, in handleAppSwitch
File "contextlib.pyc", line 24, in __exit__
File "config\__init__.pyc", line 711, in atomicProfileSwitch
File "config\__init__.pyc", line 374, in _handleProfileSwitch
File "config\__init__.pyc", line 943, in dict
File "config\__init__.pyc", line 941, in dict
File "config\__init__.pyc", line 864, in __getitem__
KeyError: u'x'
ERROR - eventHandler.executeEvent (01:10:11.604):
error executing event: gainFocus on <NVDAObjects.IAccessible.mozilla.Mozilla object at 0x038245B0> with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 150, in executeEvent
File "eventHandler.pyc", line 163, in doPreGainFocus
File "api.pyc", line 138, in setFocusObject
File "appModuleHandler.pyc", line 291, in handleAppSwitch
File "contextlib.pyc", line 35, in __exit__
File "config\__init__.pyc", line 711, in atomicProfileSwitch
File "config\__init__.pyc", line 374, in _handleProfileSwitch
File "config\__init__.pyc", line 943, in dict
File "config\__init__.pyc", line 941, in dict
File "config\__init__.pyc", line 864, in __getitem__
KeyError: u'x'
ERROR - eventHandler.executeEvent (01:10:11.700):
error executing event: gainFocus on <baseObject.Dynamic_BrokenFocusedStateDocumentMozillaIAccessible object at 0x03E432D0> with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 150, in executeEvent
File "eventHandler.pyc", line 163, in doPreGainFocus
File "api.pyc", line 138, in setFocusObject
File "appModuleHandler.pyc", line 291, in handleAppSwitch
File "contextlib.pyc", line 35, in __exit__
File "config\__init__.pyc", line 711, in atomicProfileSwitch
File "config\__init__.pyc", line 374, in _handleProfileSwitch
File "config\__init__.pyc", line 943, in dict
File "config\__init__.pyc", line 941, in dict
File "config\__init__.pyc", line 864, in __getitem__
KeyError: u'x'
IO - inputCore.InputManager.executeGesture (01:10:24.244):
Input: kb(laptop):alt+tab
ERROR - eventHandler.executeEvent (01:10:24.298):
error executing event: gainFocus on <baseObject.Dynamic_MultitaskingViewFrameListItemListItemUIA object at 0x076143D0> with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 150, in executeEvent
File "eventHandler.pyc", line 163, in doPreGainFocus
File "api.pyc", line 138, in setFocusObject
File "appModuleHandler.pyc", line 291, in handleAppSwitch
File "contextlib.pyc", line 24, in __exit__
File "config\__init__.pyc", line 711, in atomicProfileSwitch
File "config\__init__.pyc", line 374, in _handleProfileSwitch
File "config\__init__.pyc", line 943, in dict
File "config\__init__.pyc", line 941, in dict
File "config\__init__.pyc", line 864, in __getitem__
KeyError: u'x'
ERROR - eventHandler.executeEvent (01:10:25.313):
error executing event: gainFocus on <NVDAObjects.IAccessible.mozilla.Mozilla object at 0x07327F30> with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 150, in executeEvent
File "eventHandler.pyc", line 163, in doPreGainFocus
File "api.pyc", line 138, in setFocusObject
File "appModuleHandler.pyc", line 291, in handleAppSwitch
File "contextlib.pyc", line 35, in __exit__
File "config\__init__.pyc", line 711, in atomicProfileSwitch
File "config\__init__.pyc", line 374, in _handleProfileSwitch
File "config\__init__.pyc", line 943, in dict
File "config\__init__.pyc", line 941, in dict
File "config\__init__.pyc", line 864, in __getitem__
KeyError: u'x'
ERROR - eventHandler.executeEvent (01:10:25.401):
error executing event: gainFocus on <baseObject.Dynamic_BrokenFocusedStateDocumentMozillaIAccessible object at 0x0762AFF0> with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 150, in executeEvent
File "eventHandler.pyc", line 163, in doPreGainFocus
File "api.pyc", line 138, in setFocusObject
File "appModuleHandler.pyc", line 291, in handleAppSwitch
File "contextlib.pyc", line 35, in __exit__
File "config\__init__.pyc", line 711, in atomicProfileSwitch
File "config\__init__.pyc", line 374, in _handleProfileSwitch
File "config\__init__.pyc", line 943, in dict
File "config\__init__.pyc", line 941, in dict
File "config\__init__.pyc", line 864, in __getitem__
KeyError: u'x'
IO - inputCore.InputManager.executeGesture (01:10:26.983):
Input: kb(laptop):windows+r
ERROR - eventHandler.executeEvent (01:10:27.144):
error executing event: gainFocus on <baseObject.Dynamic_IAccessibleEditWindowNVDAObject object at 0x075B5D50> with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 150, in executeEvent
File "eventHandler.pyc", line 163, in doPreGainFocus
File "api.pyc", line 138, in setFocusObject
File "appModuleHandler.pyc", line 291, in handleAppSwitch
File "contextlib.pyc", line 24, in __exit__
File "config\__init__.pyc", line 711, in atomicProfileSwitch
File "config\__init__.pyc", line 374, in _handleProfileSwitch
File "config\__init__.pyc", line 943, in dict
File "config\__init__.pyc", line 941, in dict
File "config\__init__.pyc", line 864, in __getitem__
KeyError: u'x'
DEBUGWARNING - Python warning (01:10:27.158):
C:\Program Files (x86)\NVDA\library.zip\api.py:274: DeprecationWarning: Yield() is deprecated
IO - inputCore.InputManager.executeGesture (01:10:28.516):
Input: kb(laptop):n
IO - inputCore.InputManager.executeGesture (01:10:28.569):
Input: kb(laptop):v
IO - inputCore.InputManager.executeGesture (01:10:28.803):
Input: kb(laptop):d
IO - inputCore.InputManager.executeGesture (01:10:29.003):
Input: kb(laptop):a
IO - inputCore.InputManager.executeGesture (01:10:29.171):
Input: kb(laptop):space
IO - speech.speakTypedCharacters (01:10:29.187):
typed word: nvda
IO - speech.speak (01:10:29.187):
Speaking [LangChangeCommand (u'en_US'), u'nvda']
DEBUG - synthDrivers.oneCore.SynthDriver._processQueue (01:10:29.187):
Begin processing speech
DEBUG - synthDrivers.oneCore.SynthDriver._callback (01:10:29.203):
Done pushing audio
DEBUG - synthDrivers.oneCore.SynthDriver._processQueue (01:10:29.203):
Calling idle on audio player
DEBUG - synthDrivers.oneCore.SynthDriver._processQueue (01:10:29.701):
Queue empty, done processing
IO - inputCore.InputManager.executeGesture (01:10:29.773):
Input: kb(laptop):-
DEBUG - synthDrivers.oneCore.SynthDriver.cancel (01:10:29.782):
Cancelling
IO - inputCore.InputManager.executeGesture (01:10:29.997):
Input: kb(laptop):r
IO - inputCore.InputManager.executeGesture (01:10:30.319):
Input: kb(laptop):enter
ERROR - eventHandler.executeEvent (01:10:30.388):
error executing event: gainFocus on <NVDAObjects.IAccessible.StaticText object at 0x075D7AF0> with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 150, in executeEvent
File "eventHandler.pyc", line 163, in doPreGainFocus
File "api.pyc", line 138, in setFocusObject
File "appModuleHandler.pyc", line 291, in handleAppSwitch
File "contextlib.pyc", line 24, in __exit__
File "config\__init__.pyc", line 711, in atomicProfileSwitch
File "config\__init__.pyc", line 374, in _handleProfileSwitch
File "config\__init__.pyc", line 943, in dict
File "config\__init__.pyc", line 941, in dict
File "config\__init__.pyc", line 864, in __getitem__
KeyError: u'x'
DEBUGWARNING - IAccessibleHandler.accessibleObjectFromEvent (01:10:30.473):
oleacc.AccessibleObjectFromEvent with window 721814, objectID -4 and childID 0: [Error -2147467259] Unspecified error
ERROR - eventHandler.executeEvent (01:10:30.513):
error executing event: gainFocus on <NVDAObjects.IAccessible.sysListView32.ListItem object at 0x038245B0> with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 150, in executeEvent
File "eventHandler.pyc", line 163, in doPreGainFocus
File "api.pyc", line 138, in setFocusObject
File "appModuleHandler.pyc", line 291, in handleAppSwitch
File "contextlib.pyc", line 24, in __exit__
File "config\__init__.pyc", line 711, in atomicProfileSwitch
File "config\__init__.pyc", line 374, in _handleProfileSwitch
File "config\__init__.pyc", line 943, in dict
File "config\__init__.pyc", line 941, in dict
File "config\__init__.pyc", line 864, in __getitem__
KeyError: u'x'
INFO - core.main (01:10:30.579):
Exiting
|
|
My apologies. I forgot that sending attachments in plane text via email just pastes them inline rather than linked files. |
|
Updating to the latest alpha does solve my issues. Thank you. I'm no longer receiving the errors. |
|
Due to Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1502260 |
|
@michaelDCurran Should this become necessary, will it only be backed out from the beta and release branches, or alpha as well? Because it would be good to keep it in Alpha I think, so we can continue testing possible fixes with this code. |
|
I guess we could back it out of beta, that wouldn't be a problem.
|
…us event before returning. This was added in nvaccess#8678 to mitigate focus "rubber-banding" and spurious switching to focus mode when moving fast in browse mode. However, this degrades performance. Removing this code, this no longer seems to be a problem. It's likely that changes in Firefox, NVDA or both mitigated this. The changes to Firefox to avoid extraneous tree re-creation are a likely candidate.
…us event before returning. (#10584) This was added in #8678 to mitigate focus "rubber-banding" and spurious switching to focus mode when moving fast in browse mode. However, this degrades performance. Removing this code, this no longer seems to be a problem. It's likely that changes in Firefox, NVDA or both mitigated this. The changes to Firefox to avoid extraneous tree re-creation are a likely candidate.
Link to issue number:
None.
Summary of the issue:
Currently when our virtualBuffers are told that a node is invalid and needs re-rendering, the backend re-renders the entire subtree. This is true even if none of the node's children actually changed.
This wastes a lot of time as in many cases only a property on the node itself changed, but all its children remain unchanged.
This is especially noticeable in newer Firefox builds where renders now take somewhat longer.
The best example of this is on the page:
https://de.wikipedia.org/wiki/Liste_der_Tatort-Folgen
The page itself is extraordinarily large, however every time a link is focused, a tooltip (or something) is appended to the end of the document. This causes NVDA's virtualBuffer to re-render the entire document. Yet in reality the only thing that changed was a node got added at the end.
From the users' point of view, they notice a lag of up to 15 seconds every time they arrow onto or tab to a link.
Description of how this pull request fixes the issue:
VBufStorage buffers and backends have been slightly changed to allow a render in a temporary buffer to reuse existing nodes for one or more of its descendants if the existing node itself has not been marked as invalid.
Specific changes:
Only the Gecko VBufBackend makes use of this new functionality. Therefore this affects Firefox and Chrome.
This was briefly tried for MSHTML but very strange results occurred when moving nodes with javascript.
Testing performed:
In Firefox and Chrome, Tested NVDA on the German wikipedia page. Plus NV Access's dynamic_content_tests, moveNodes and formFields html tests.
Known issues with pull request:
None so far. But does require a lot of user testing to ensure information doesn't go missing, or no crashes start occurring.
Change log entry:
Bug fixes: