RFR 8012987: Optimizations for Stream.limit/substream (original) (raw)
Paul Sandoz paul.sandoz at oracle.com
Fri Jun 14 12:40:59 UTC 2013
- Previous message: hg: jdk8/tl/jdk: 7169142: CookieHandler does not work with localhost
- Next message: RFR 8012987: Optimizations for Stream.limit/substream
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
This patch implements optimizations for the limit/substream operations when input to those operations have certain properties (corresponding to known size or unordered) which helps to avoid out of memory issues (not all, we still have some more work to do).
The {Xxx}/Stream.generate methods have been modified to generate a known infinite stream of unordered elements. Previously an ordered known infinite stream of elements was generated, making it particularly prone to OOMEs.
http://cr.openjdk.java.net/~psandoz/tl/JDK-8012987-slice/webrev/
This is based on the following in order, still requiring reviews (hint hint):
http://cr.openjdk.java.net/~psandoz/tl/JDK-8016308-Node/webrev/ http://cr.openjdk.java.net/~psandoz/tl/JDK-8016324-pipelines/webrev/ http://cr.openjdk.java.net/~psandoz/tl/JDK-8016455-stream-tests/webrev/
Plus:
http://cr.openjdk.java.net/~henryjen/ccc/8009736.2/webrev/ (Note this is not rebased in this version, but is in my patch queue)
Paul.
- Previous message: hg: jdk8/tl/jdk: 7169142: CookieHandler does not work with localhost
- Next message: RFR 8012987: Optimizations for Stream.limit/substream
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]