-
Notifications
You must be signed in to change notification settings - Fork 28
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
Refactor and optimize querying pathContents
#1141
Conversation
First of all, this fixes and adds missing type annotations. It then deduplicates the code between `pathContents` and the `deprecated` variant, which were 99% identical. Resolving the path contents was also optimized a little bit by not filtering the report for "files matching *any* session in the report", aka "all files". Other optimizations include avoiding some intermediate allocations by sorting lists in-place, and simplifying some functions.
6af00f3
to
5f2cb34
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Changes have been made to critical files, which contain lines commonly executed in production. Learn more ✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #1141 +/- ##
==========================================
- Coverage 96.07% 96.05% -0.02%
==========================================
Files 837 838 +1
Lines 19855 20323 +468
==========================================
+ Hits 19075 19521 +446
- Misses 780 802 +22
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. 📢 Thoughts on this report? Let us know! |
✅ All tests successful. No failed tests were found. 📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
❌ 5 Tests Failed:
View the top 3 failed tests by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
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.
qq about a functionality change in get_sorted_paths, but lgtm to merge
First of all, this fixes and adds missing type annotations.
It then deduplicates the code between
pathContents
and thedeprecated
variant, which were 99% identical.Resolving the path contents was also optimized a little bit by not filtering the report for "files matching any session in the report", aka "all files". Other optimizations include avoiding some intermediate allocations by sorting lists in-place, and simplifying some functions.