-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
fix: Properly exclude attributes from snapshots to speed up xpath lookup #386
Conversation
CC @sshock |
Oh nice. Will be interesting to see if this helps our performance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code change seems good to me. (I haven't tested this well with this branch tho.)
Issues
======
- Added 1
Complexity increasing per file
==============================
- app/src/main/java/io/appium/uiautomator2/model/UiElementSnapshot.java 16
- app/src/main/java/io/appium/uiautomator2/utils/ElementLocationHelpers.java 1
See the complete overview on Codacy |
if (value != null) { | ||
attribs.put(key, value); | ||
} | ||
} | ||
|
||
private Map<Attribute, Object> collectAttributes(AccessibilityNodeInfo node, int index) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously we were only excluding redundant attributes from the xml itself, which did not affect the performance much, but now we also exclude them from snapshots. And it does the job