RFR 8020040: Improve and generalize the F/J tasks to handle right or left-balanced trees
Paul Sandoz
paul.sandoz at oracle.com
Mon Jul 8 15:56:02 UTC 2013
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.
More information about the core-libs-dev
mailing list