perf(get-element-stack): improve getElementStack performance on large pages#4026
Merged
straker merged 4 commits intodequelabs:developfrom May 30, 2023
qazwsxedcrfvtgb1111:perf-get-element-stack
Merged
perf(get-element-stack): improve getElementStack performance on large pages#4026straker merged 4 commits intodequelabs:developfrom qazwsxedcrfvtgb1111:perf-get-element-stack
straker merged 4 commits intodequelabs:developfrom
qazwsxedcrfvtgb1111:perf-get-element-stack
Conversation
straker
previously requested changes
May 22, 2023
Contributor
straker
left a comment
There was a problem hiding this comment.
Thanks for the pr. I can see how caching getScroll would greatly improve performance when the grid is created as we call it for every ancestor in findScrollRegionParent. A better way to do the caching would be to wrap the function using memoize instead of the using the internal cache. You can see an example of that in get-cell-position.
Contributor
|
Thanks. Approved for security |
straker
approved these changes
May 30, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pr improves the performance of getElementStack on large pages by caching the results of getScroll.
Tested with axe-extension keyboard igt on this page: https://bop.nv.gov/Board/BoardMtgs/
Saves ~200-400 ms on every getElementStack call