logo separator

[mkgmap-dev] Move to Java 1.8

From Gerd Petermann GPetermann_muenchen at hotmail.com on Wed Aug 3 06:47:44 BST 2016

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 at lists.mkgmap.org.uk> im Auftrag von UliBaer <ulibaer at gmail.com>
Gesendet: Dienstag, 2. August 2016 18:11:34
An: mkgmap-dev at 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 at lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20160803/cfca04c4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: move_to_java_8.patch
Type: application/x-download
Size: 1499 bytes
Desc: move_to_java_8.patch
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20160803/cfca04c4/attachment-0001.bin>


More information about the mkgmap-dev mailing list