Closed Bug 1546555 Opened 5 years ago Closed 5 years ago

Improve performance of the accessibility audit.

Categories

(DevTools :: Accessibility Tools, enhancement)

enhancement
Not set
normal

Tracking

(firefox68 verified)

VERIFIED FIXED
Firefox 68
Tracking Status
firefox68 --- verified

People

(Reporter: yzen, Assigned: yzen)

References

Details

Attachments

(2 files)

After some profiling of really text heavy pages that require a lot of colour contrast calculation it looks like a lot of time is spent generating a complete form for accessible object actors.

A lot of time is spent on calculating attributes, states and other properties that are only necessary when the accessible object is selected and these properties are rendered in the a11y panel sidebar.

For rendering of the a11y tree we only require the following things:

  • name
  • role
  • childCount
  • checks

We need to split up the information that the is sent on form call from the information that is needed to render a complete sidebar for an accessible object.

Here's are 2 profiles:

  • Profile 1: https://perfht.ml/2UDkE9o
    This is before changes with form sending complete data about accessible object. You can see about 40% is spend on generating attributes, multiple calls to isDefunct (that is checked when accesible actor property getters are accessed), domNodeType

  • Profile 2: https://perfht.ml/2UBpbcs
    This is a profile where form only contains data always needed by the a11y tree. All of the overhead above is gone.

Attachment #9060582 - Attachment description: Bug 1546555 - include WCAG score as part of contrast check to only calculate once. Rename ColorContrastScores constant to SCORES to be used by all checks. r=nchevobbe → Bug 1546555 - include WCAG score as part of contrast check to only calculate once. Rename ColorContrastScores constant to SCORES to be used by all checks. r=gl
Pushed by yura.zenevich@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/660c16b89380
make AccessibleActor form data a smallest set of accessible data necessary for the a11y panel to work. Allow for fetching full accessible object data via new hydrate method. r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/70a7b7db7b84
include WCAG score as part of contrast check to only calculate once. Rename ColorContrastScores constant to SCORES to be used by all checks. r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68

Tested on latest Nightly 68.0a1 (2019-05-01) (64-bit) on Windows 10, MacOS 10.13 and Ubuntu 16.04.

Full page audit is calculated way faster on different pages with a lot of content and doesn't hinder the browser or devtools functionality nor the loading of the site itself.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: