vendredi 11 septembre 2015

Java 8 stream processing not fluent

I have a problem with Java 8 streams, where the data is processed in sudden bulks, rather than when they are requested. I have a rather complex stream-flow which has to be parallelised because I use concat to merge two streams.

My issue stems from the fact that data seems to be parsed in large bulks minutes - and sometimes even hours - apart. I would expect this processing to happen as soon as the Stream reads incoming data, to spread the workload. Bulk processing seems counterintuitive in almost every way.

My input is a Spliterator of unknown size and I use a forEach as the terminal operation.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire