Closed Bug 1640553 Opened 1 year ago Closed 1 year ago

Use handler to avoid cross-process calls when querying row/column headers

Categories

(Core :: Disability Access APIs, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Currently, even with AccessibleHandler, fetching row and column headers is two cross-process calls. Moreover, the same headers often apply to many cells, which means we're marshaling the same objects many times.

We should include row and column headers in the handler payload. However, even there, we don't want to include the actual objects, since that may still mean we marshal the same headers many times. Instead, we should just include their ids. The handler must then cache headers by id and return cached headers to the client.

With the patch for bug 1638238, a 10000 row table takes ~32 sec to render an NVDA browse mode buffer. With row/headers cached as described above, it takes ~21 sec.

This cache is cleared when other AccessibleHandler caches are invalidated; i.e. when an event is fired.

  1. When we unmarshal a row/column header, cache it so we can get it by id later.
  2. get_rowHeaderCells and get_columnHeaderCells use the header ids in the payload.
    If the headers are in the cache (as per 1), return them to the client.
    Otherwise, fall back to a cross-process call, which might happen if we haven't encountered the header yet.
Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6658e0ae7e35
part 1: Add the ability for AccessibleHandler to cache accessibles by id. r=eeejay
https://hg.mozilla.org/integration/autoland/rev/4e0cd8a3d83c
part 2: Include row/column header cell ids in the payload for AccessibleHandler. r=eeejay
https://hg.mozilla.org/integration/autoland/rev/25dd5eeb676f
part 3: AccessibleHandler: Use the row/column header ids in the payload to avoid cross-process calls. r=eeejay
Blocks: 1473310
Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fca8c3441924
part 1: Add the ability for AccessibleHandler to cache accessibles by id. r=eeejay
https://hg.mozilla.org/integration/autoland/rev/43767daa796f
part 2: Include row/column header cell ids in the payload for AccessibleHandler. r=eeejay
https://hg.mozilla.org/integration/autoland/rev/d167ecd4e318
part 3: AccessibleHandler: Use the row/column header ids in the payload to avoid cross-process calls. r=eeejay
Flags: needinfo?(jteh)
Regressions: 1642141
Regressions: 1666720
You need to log in before you can comment on or make changes to this bug.