Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow rules should turn themselves off on large pages #1464

Closed
WilcoFiers opened this issue Mar 31, 2019 · 3 comments · Fixed by #1503
Closed

Slow rules should turn themselves off on large pages #1464

WilcoFiers opened this issue Mar 31, 2019 · 3 comments · Fixed by #1503
Labels
core Issues in the core code (lib/core) feat New feature or enhancement performance Performance related issues

Comments

@WilcoFiers
Copy link
Contributor

Testing a page with 70k DOM nodes, axe was unable to complete. Turning off just a few rules known to be particularly slow solves this problem. I created this configuration, which enables axe to complete in 26s.

{
  "rules": [{
     "id": "color-contrast",
     "enabled": false
   }, {
     "id": "duplicate-id-active",
     "enabled": false
   }, {
     "id": "duplicate-id-aria",
     "enabled": false
   }, {
     "id": "duplicate-id",
     "enabled": false
  }],
  "checks": []
}

One possible solution would be to provide a "slow" flag, which when running on very large pages turns those rules off, returning a single "incomplete" result. We can add an option to axe that will force to alway run slow rules. But having this feature will help axe-core complete even on very large pages. We could consider different thresholds for different rules based on the number of DOM nodes.

@WilcoFiers WilcoFiers added feat New feature or enhancement core Issues in the core code (lib/core) labels Mar 31, 2019
@AutoSponge
Copy link
Contributor

AutoSponge commented Apr 18, 2019

If you're looking for a benchmark, I can suggest https://js.tensorflow.org/api/latest/ (only 23k nodes but painfully slow).

@mohanraj-r
Copy link
Contributor

A way to label and exclude slow rules seems like a good idea 👍 @WilcoFiers

Btw in my tests I have found that oddly link-name rule also takes almost the same amount of time as color-contrast

@dylanb
Copy link
Contributor

dylanb commented Jun 15, 2019

@WilcoFiers perhaps we could use the AOM to speed up the calculation of accessible name for situations that are simple (i.e. do not fall into the "lowest common denominator" category) - thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues in the core code (lib/core) feat New feature or enhancement performance Performance related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants