Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-22 Thread David Alayachew
-libs-dev < > core-libs-dev@openjdk.org> > *Subject:* Re: [External] : Re: Question about Streams, Gatherers, and > fetching too many elements > > > Thanks for the context Viktor. I think I got to see that breadth vs depth > threshold myself when work with danielaveryj on redd

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-21 Thread David Alayachew
{ "emoji": "👍", "version": 1 }

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-21 Thread Viktor Klang
; core-libs-dev Subject: Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements Thanks for the context Viktor. I think I got to see that breadth vs depth threshold myself when work with danielaveryj on reddit. They explained largely in the way that you did, and

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-21 Thread David Alayachew
come with trade-offs) > > Cheers, > √ > > > *Viktor Klang* > Software Architect, Java Platform Group > Oracle > -- > *From:* core-libs-dev on behalf of > Viktor Klang > *Sent:* Tuesday, 19 November 2024 13:19 > *To:* David Alayachew

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-19 Thread David Alayachew
ct, Java Platform Group > Oracle > -- > *From:* David Alayachew > *Sent:* Thursday, 14 November 2024 23:45 > *To:* Viktor Klang > *Cc:* Rob Spoor ; core-libs-dev < > core-libs-dev@openjdk.org> > *Subject:* Re: [External] : Re: Question about

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-19 Thread Viktor Klang
From: David Alayachew mailto:davidalayac...@gmail.com>> Sent: Thursday, 14 November 2024 12:36 To: Viktor Klang mailto:viktor.kl...@oracle.com>> Cc: Rob Spoor mailto:open...@icemanx.nl>>; core-libs-dev mailto:core-libs-dev@openjdk.org>> Subject: Re: [External] : Re: Questio

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-19 Thread Viktor Klang
..@gmail.com>> Sent: Thursday, 14 November 2024 12:36 To: Viktor Klang mailto:viktor.kl...@oracle.com>> Cc: Rob Spoor mailto:open...@icemanx.nl>>; core-libs-dev mailto:core-libs-dev@openjdk.org>> Subject: Re: [External] : Re: Question about Streams, Gatherers, and fetching too ma

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-19 Thread David Alayachew
>> √ >> >> >> *Viktor Klang* >> Software Architect, Java Platform Group >> Oracle >> -- >> *From:* David Alayachew >> *Sent:* Thursday, 14 November 2024 12:36 >> *To:* Viktor Klang >> *Cc:* Rob Spoor ; core-libs-dev < >> co

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-14 Thread David Alayachew
Rob Spoor ; core-libs-dev < > core-libs-dev@openjdk.org> > *Subject:* Re: [External] : Re: Question about Streams, Gatherers, and > fetching too many elements > > > Then let me correct myself again, while simplifying -- I just want that > detail, that certain combinations might le

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-14 Thread Viktor Klang
36 To: Viktor Klang Cc: Rob Spoor ; core-libs-dev Subject: Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements Then let me correct myself again, while simplifying -- I just want that detail, that certain combinations might lead to pre-fetching everything,

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-14 Thread David Alayachew
ibs-dev on behalf of David > Alayachew > *Sent:* Wednesday, 13 November 2024 14:07 > *To:* Rob Spoor > *Cc:* core-libs-dev > *Subject:* Re: [External] : Re: Question about Streams, Gatherers, and > fetching too many elements > > That is a good point Rob. > > The

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-14 Thread Viktor Klang
2024 14:07 To: Rob Spoor Cc: core-libs-dev Subject: Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements That is a good point Rob. Then let me correct myself -- I think the terminal operations don't do a great job of advertising whether or not they pre-

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-13 Thread David Alayachew
te). > >> > >> Fortunately, I think Gatherers can unlock much more situations where > >> unbounded streams can be processed. > >> > >> Cheers, > >> √ > >> > >> > >> *Viktor Klang* > >> Software Architect, Java P

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-13 Thread Rob Spoor
ers, √ *Viktor Klang* Software Architect, Java Platform Group Oracle -- *From:* David Alayachew *Sent:* Tuesday, 12 November 2024 15:08 *To:* Viktor Klang *Cc:* core-libs-dev *Subject:* Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements Oh woah.

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-13 Thread David Alayachew
memory, that is likely to lead to less desirable outcomes. > > What I was able to do for Gatherers is to implement "gather(…) + > collect(…)"-fusion so any number of consecutive gather(…)-operations > immediately followed by a collect(…) is run in the same "island". >

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-13 Thread Viktor Klang
To: Viktor Klang mailto:viktor.kl...@oracle.com>> Cc: core-libs-dev mailto:core-libs-dev@openjdk.org>> Subject: Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements Oh woah. I certainly did not. Or rather, I had dismissed the idea as soon as I thought o

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-12 Thread David Alayachew
t; unbounded streams can be processed. >> >> Cheers, >> √ >> >> >> *Viktor Klang* >> Software Architect, Java Platform Group >> Oracle >> -- >> *From:* David Alayachew >> *Sent:* Tuesday, 12 November 2024 15:0

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-12 Thread David Alayachew
unbounded streams can be processed. > > Cheers, > √ > > > *Viktor Klang* > Software Architect, Java Platform Group > Oracle > -- > *From:* David Alayachew > *Sent:* Tuesday, 12 November 2024 15:08 > *To:* Viktor Klang > *Cc:* core-libs

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-12 Thread Viktor Klang
mailto:viktor.kl...@oracle.com>> Cc: core-libs-dev mailto:core-libs-dev@openjdk.org>> Subject: Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements Good to know, ty vm. At the very least, I have this workaround. This will meet my needs for now. I gu

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-12 Thread David Alayachew
r Klang* > Software Architect, Java Platform Group > Oracle > -- > *From:* David Alayachew > *Sent:* Tuesday, 12 November 2024 01:53 > *To:* Viktor Klang > *Cc:* core-libs-dev > *Subject:* Re: [External] : Re: Question about Streams, Gatherers, and

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-12 Thread Viktor Klang
bs-dev@openjdk.org>> Subject: [External] : Re: Question about Streams, Gatherers, and fetching too many elements Thanks for the workaround. It's running beautifully. Is there a future where this island concept is extended to the rest of streams? Tbh, I don't fully understand it.

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-11 Thread David Alayachew
gt; Software Architect, Java Platform Group > Oracle > -- > *From:* David Alayachew > *Sent:* Monday, 11 November 2024 18:32 > *To:* Viktor Klang > *Cc:* core-libs-dev > *Subject:* [External] : Re: Question about Streams, Gatherers, and > fetching too many elem

Re: [External] : Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-11 Thread Viktor Klang
); Cheers, √ Viktor Klang Software Architect, Java Platform Group Oracle From: core-libs-dev mailto:core-libs-dev-r...@openjdk.org>> on behalf of David Alayachew mailto:davidalayac...@gmail.com>> Sent: Monday, 11 November 2024 14:52 To: core-libs-dev mailto:

Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-11 Thread David Alayachew
t; .collect(forEach(eachList -> println(eachList.getFirst(; > > > Cheers, > √ > > > *Viktor Klang* > Software Architect, Java Platform Group > Oracle > -------------- > *From:* core-libs-dev on behalf of David > Alayachew > *Sent:* Monday,

Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-11 Thread Viktor Klang
ktor Klang Software Architect, Java Platform Group Oracle From: core-libs-dev on behalf of David Alayachew Sent: Monday, 11 November 2024 14:52 To: core-libs-dev Subject: Re: Question about Streams, Gatherers, and fetching too many elements And just to avoid th

Re: Question about Streams, Gatherers, and fetching too many elements

2024-11-11 Thread David Alayachew
And just to avoid the obvious question, I can hold about 30 batches in memory before the Out of Memory error occurs. So this is not an issue of my batch size being too high. But just to confirm, I set the batch size to 1, and it still ran into an out of memory error. So I feel fairly confident say