LazyInstantiator: Don't call GetProp if a11y is already instantiated
Categories
(Core :: Disability Access APIs, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox117 | --- | fixed |
People
(Reporter: Jamie, Assigned: Jamie)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
LazyInstantiator::GetRootAccessible first calls GetProp to get an existing LazyInstantiator. If we've already instantiated accessibility, that is pointless because we want to return the real root and we've already cleared the LazyInstantiator property anyway. Instead, we should only call GetProp if accessibility isn't already instantiated.
This shouldn't make any real difference, but GetProp does show up a lot in a profile on bug 1841665. I suspect that with this change, we'll just see a lot of calls to something else; I think the client is just retrieving the root window a lot for some reason. Still, optimising this can't hurt.
| Assignee | ||
Comment 1•2 years ago
|
||
If a11y is instantiated, we always want to return the real root.
Furthermore, we clear the instantiator prop anyway when we instantiate a11y.
Therefore, calling GetProp is wasteful if a11y is instantiated.
Instead, we now only call GetProp if a11y isn't instantiated yet.
Comment 3•2 years ago
|
||
| bugherder | ||
Description
•