Closed Bug 1779162 Opened 2 years ago Closed 2 years ago

Performance optimisation in CachedTableCellAccessible::RowHeaderCells

Categories

(Core :: Disability Access APIs, task)

task

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

Details

Attachments

(1 file)

RowHeaderCells currently calls CellAt, which returns an Accessible. But RowHeaderCells wants the CachedTableCellAccessible as well, so it then has to call AsTableCellBase, which walks the ancestors to get the table again. We already have the table and we have access to its private data, so we should just get what we need directly, avoiding unnecessary ancestor walks.

Previously, we used CellAt, but this returns the Accessible, discarding the CachedTableCellAccessible.
RowHeaderCells needs both, so it then called AsTableCellBase, which must walk ancestors to get the table.
We already have the table and access to its private data, so use it directly.
This is probably an insignificant performance improvement, but the unnecessary indirection was bothering me.

Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/432b229a7cb3
Don't walk ancestors unnecessarily in CachedTableCellAccessible::RowHeaderCells. r=morgan
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: