
Hi Uli + Steve, reg. config files: I think the file .classpath should also be changed to state 1-8, see attached patch. Gerd ________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von UliBaer <ulibaer@gmail.com> Gesendet: Dienstag, 2. August 2016 18:11:34 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] Move to Java 1.8 Gerd Petermann wrote
Hi Uli,
thanks for the patch. I tried it and found no significant change in run time or memory usage. My test case: Compile 9 tiles (a part of the Britisch Isles) (with --max-jobs on 4 cores) In what scenario do you think that the stream methods should save time?
My understanding is that the list streaming is better as it allows automatic use of multiple cores, so I'd expect improvements in e.g. the gmapsupp builder which uses a single thread, but not in the code which compiles the tiles. On the other hand, the combiners which run single threaded are probably more I/O bound.
Gerd
Hi Gerd, the patch only used the sequential .stream(). method. If you want to use multiple cores, simply replace the .stream(). with .parallelStream(). and the jvm tries to work parallel pipelines with multiple threads. You only have to be aware, that the order of processing is completely arbitrary in that case, so the atomic operations have to be independent of each other and not depend on the order of execution. Also the order of elements in the resulting list is arbitrary. This can be worked around by using a SortedList for the collection or by using .sorted((o1, o2) -> o1.getField().compareTo(o2.getField())). near the end of the streaming pipeline. Best regards, Uli -- View this message in context: http://gis.19327.n5.nabble.com/Move-to-Java-1-8-tp5879546p5879702.html Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev