-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Optimise FallbackIfEmpty #464
Optimise FallbackIfEmpty #464
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #464 +/- ##
==========================================
+ Coverage 91.44% 91.47% +0.02%
==========================================
Files 245 245
Lines 7936 7949 +13
Branches 1608 1611 +3
==========================================
+ Hits 7257 7271 +14
+ Misses 461 460 -1
Partials 218 218
☔ View full report in Codecov by Sentry. |
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.
Check out this test for an example of why we cannot evaluate collection count when the operator is called.
In further consideration, I wonder if I was forgetting that when I write the issue. In theory, this could be abstracted to an If()
that selects the right IEnumerable
, but in practice, don't know that it's an actual optimization.
I'm going to leave this open for a few days while I ponder whether to ask you to improve this or to ask me to stop coming up with bad ideas... :)
@julienasp I think I would like to have |
perfect i'll work on that this weekend |
0c35eb5
to
c38c883
Compare
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.
Thanks! Looking good so far.
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.
I think this is the last round of changes. 🤞🏼
@julienasp Thanks! |
This PR improves the
FallbackIfEmpty
performance in the case of collections.Fixes #367