Avoid fetching all states in AccGroupInfo::Update
Categories
(Core :: Disability Access APIs, enhancement, P3)
Tracking
()
People
(Reporter: Jamie, Unassigned)
Details
(Keywords: perf)
Attachments
(1 obsolete file)
Even though we cache group info and use sibling group info to improve performance, the initial NVDA buffer render of a large list, table, etc. is hideously slow. For example, the initial buffer render for a simple 7000 item <ul>
takes ~10 seconds. Refreshing the buffer takes ~4.3 seconds.
The reason for most of this is that AccGroupInfo::Update calls Accessible::State to check for the invisible state. That means we calculate all states and throw away most of them. If I remove the state check, the initial NVDA buffer render goes down to ~4.9 seconds.
Unfortunately, we probably can't just replace this with Accessible::VisibilityState because that only provides the layout info; it can't be overridden at present. Subclasses override NativeState or State and mess with the visibility states there.
Reporter | ||
Comment 1•5 years ago
|
||
(In reply to James Teh [:Jamie] from comment #0)
Unfortunately, we probably can't just replace this with Accessible::VisibilityState because that only provides the layout info;
Doing this doesn't help that much anyway. That suggests calculating the visibility states is expensive. I'm hoping the offscreen state is the expensive part, since GroupInfo only needs the invisible state, but I haven't tested that.
Subclasses override NativeState or State and mess with the visibility states there.
The ones we need to look at:
- DocAccessible, ImageAccessible, XULTreeItemAccessible should be pretty simple
- HTMLSelectAccessible and friends, XULMenuAccessible and friends might be a bit trickier
Reporter | ||
Comment 2•5 years ago
|
||
The potential perf improvement here is no longer anywhere near as significant with bug 1632467 fixed. It's still probably worth looking into, though.
Reporter | ||
Comment 3•5 years ago
|
||
Reporter | ||
Comment 4•5 years ago
|
||
I'm attaching my WIP patch (definitely not ready for landing). I don't see an observable perf difference with this change with the fix for bug 1632467. Given that this will require a decent refactor of States code to be feasible, I don't think it's worth pursuing this any more. If that changes, the patch is here for reference.
Updated•3 years ago
|
Description
•