You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code like stream.map(foo::expensiveConversion).limit(N), stream.sorted().limit(N), or stream.filter(this::someFilter).sorted() does not trigger any warnings for inefficiency.
What did you want to happen?
If one writes code that limits or filters a Stream we should push those predicates earlier in the pipeline where possible to limit the amount of downstream computation and allocations are performed.
The text was updated successfully, but these errors were encountered:
What happened?
Code like
stream.map(foo::expensiveConversion).limit(N)
,stream.sorted().limit(N)
, orstream.filter(this::someFilter).sorted()
does not trigger any warnings for inefficiency.What did you want to happen?
If one writes code that
limit
s orfilter
s aStream
we should push those predicates earlier in the pipeline where possible to limit the amount of downstream computation and allocations are performed.The text was updated successfully, but these errors were encountered: