accessibility-developer-tools
accessibility-developer-tools copied to clipboard
Performance
The audit is slow to the point of unusable on large pages with many elements.
Idea: prune out parts of the page which are hidden from all users. We might need to be judicious about this: the reason we didn't do this from the beginning is that hidden elements are usually just waiting around to be shown, and so not auditing them may fail to catch real accessibility issues which are lurking. It might be worth auditing the rules to see which ones truly don't make sense to run on hidden elements.
@alice I agree with everything you say above.
I believe that the optimum performance would be attained if there was a "one touch" rule for each DOM element. Currently each rule queries the DOM independently, often evaluating the same nodes, for example isElementOrAncestorHidden
.
Imagine an audit runner that essentially walks the DOM once, checks if the current element is hidden (disabled etc) and then passes that information to each rule along with the element. In other words each rule would not know how to search the DOM for "relevant elements" but rather would take a single element, check it is "relevant" and then audit it.
Some rules will be difficult to achieve true "one touch" on because, for example, they may need to collect ID referrers or check what kind of parent or ancestor they are contained in, or what child nodes they have. Even this could probably be solved (some kind of crazy state machine perhaps) but I think that would probably not be necessary.
It would be a bit of work to get it working this way but I believe it would make a huge difference.
Haha, great minds think alike - I sat down to work on this exact thing last night (didn't get very far, mind you). The extra complication for the time being is that the extension doesn't use axs.Audit.run(), so I'd need to do quite a bit of work on that side.
I have been doing some experiments and have written an audit runner that works as described above. Here are my stopwatch results based on the same web page before and after:
Current Runner: >7.5 seconds New Runner: <3.5 seconds
So it makes a significant difference but there is certainly still room for improvement.
Ditching AX_HTML_02
(DuplicateId) these numbers are:
Current Runner: 5.5 seconds New Runner 1.5 seconds
I suggest that rule be disabled by default if not simply deleted.
I'd be interested to test it on some "real" pages, any suggestions of some real slow ones are welcome.
Yeah, that rule is a tricky one - it seems like it almost needs to do a little extra work during the relevantElementMatcher
step to build up a map of ID referrers, because it walks the tree so many times during the test
step. I agree turning it off by default until we figure it out seems like an overall win.
I'm looking into making the extension use the audit runner directly. Feel free to send over a PR for your changes in any case, once you're happy with them - then I can at least develop against that version and see where the issues are going to be.
Yeah something in the relevantElementMatcher
, agreed. I reckon this would mean two phases:
- DOM traversal (walk the entire DOM before running any audit rules)
- Run audit rules
One complication is that the relevantElementMatcher
is scoped to the scope
element and its subtree whereas building up a collection of ID referrers (or other interesting elements) requires traversing the entire DOM.
I'm experimenting with this two-phase approach and will keep you posted, hopefully will come up with something PR worthy.
If the extension uses the audit runner directly that would be great - I have only glanced at the extension for now.
blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; }
Sent from Yahoo Mail for iPhone
Begin forwarded message:
On Friday, April 8, 2016, 4:03 PM, AsianDate Team [email protected] wrote:
| | | | |
Exciting news, efren!
You have new message from fangyi.
| |
|
|
| |
| |
| fangyi, 26 |
|
| |
| Read the Letter |
| | Dear efrenI am humble and thankful for your love for me. My dear , it is the best thing in my life that I come here to meet you!... | | 10 credits will be deducted from your account for opening this letter |
| |
|
| | |
Copy and paste this link if others don’t work: http://www.asiandate.com/login/mailsystem/inbox.html?token=0610682a25c1849253c74358e7e04cbd
| |
|
| |
Enjoy your experience on our site!
|
| |
| |
| |
|
This email was sent to [email protected] because you are registered on AsianDate with this email.
Please add [email protected] to your contact list to ensure our emails are delivered correctly.
You can unsubscribe from this mailing at any time.
|
| 103, Agape office 1, Triq Gharram, Zebbug ZBG 2851 |
|
| | | |
|