NEW 101370
AX: Only walk up the parent tree one time in accessibilityIsIgnored
https://bugs.webkit.org/show_bug.cgi?id=101370
Summary AX: Only walk up the parent tree one time in accessibilityIsIgnored
chris fleizach
Reported 2012-11-06 10:39:49 PST
We walk up the parent tree way too many times in accessibilityIsIgnored. we should figure out a way to consolidate
Attachments
Dominic Mazzoni
Comment 1 2012-11-06 10:57:04 PST
A few ideas: 1. Walk up the parent chain once at the beginning of the function, store it in a list/vector. Then just access that list/vector every other time it's needed. This would probably only provide a modest speedup, though - at most a small constant factor. 2. Add a bitfield to every AccessibilityObject that's updated when it's first created / inserted in the tree, keeping track of things to look for in its parent chain, like if it's a descendant of a math block, or of a canvas, or of a table. I'm pretty sure those won't every change once an AccessibilityObject is created. This could provide 3. I'm assuming that any properties that change in the parent change would trigger a layout. Perhaps we can compute a bunch of properties for each object and save the document's layout count, then recompute whenever the layout count has changed. The only thing that might not work for is ARIA-only changes, like if something in the parent chain changes aria-hidden - so maybe we'd have to explicitly mark all descendants as dirty in that case. 4. Chromium often walks the entire tree rooted at a single node. For that specific case it'd be possible to pass information about the parent chain along when exploring each child. Not sure if that'd help much with Mac. Any thoughts?
Radar WebKit Bug Importer
Comment 2 2014-02-07 11:02:21 PST
Note You need to log in before you can comment on or make changes to this bug.