Hi, This patch, contributed by Doug Lea, improves stream resource management of F/J tasks when processing right-balanced (or more accurately right-heavy) trees (e.g. those created from sequential sources):
http://cr.openjdk.java.net/~psandoz/tl/JDK-8020040-tasks/webrev/ It took us a while but the end result is remarkably simple: alternate the forking of left and right tasks. Large or infinite stream sources hooked up a short-circuiting operation such as limit no longer consume ridiculous amounts of memory. This patch is related to a previous one Henry sent for review (remove catching of OOMEs for splterators from sequential sources) Paul.