Closed Bug 1841942 Opened 2 years ago Closed 2 years ago

LazyInstantiator: Don't call GetProp if a11y is already instantiated

Categories

(Core :: Disability Access APIs, task)

Desktop
Windows
task

Tracking

()

RESOLVED FIXED
117 Branch
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.

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.

Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e4765ad84ec8 Don't call GetProp in LazyInstantiator::GetRootAccessible if a11y is already instantiated. r=nlapre
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: