-
Notifications
You must be signed in to change notification settings - Fork 821
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
PM-14255: Remove accessibility logic to improve overall performance #4206
Conversation
99d9c01
to
ac10fcf
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4206 +/- ##
=======================================
Coverage ? 89.05%
=======================================
Files ? 445
Lines ? 38645
Branches ? 5403
=======================================
Hits ? 34414
Misses ? 2357
Partials ? 1874 ☔ View full report in Codecov by Sentry. |
@@ -22,8 +22,7 @@ class BitwardenAccessibilityService : AccessibilityService() { | |||
lateinit var processor: BitwardenAccessibilityProcessor | |||
|
|||
override fun onAccessibilityEvent(event: AccessibilityEvent) { | |||
if (rootInActiveWindow?.packageName != event.packageName) return |
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.
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.
So I left the check in but reduced our calls to rootInActiveWindow
down to one. This should still have a positive impact on performance without losing the package check.
ac10fcf
to
947a93d
Compare
Thanks @SaintPatrck |
🎟️ Tracking
PM-14255
📔 Objective
This PR makes two major performance improvements for the accessibility service.
typeWindowContentChanged
event type which occurs much more frequently than needed.RootInActiveWindow
which can take a long time to access.📸 Screenshots
before.mp4
after.mp4
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmedissue and could potentially benefit from discussion
:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes