[OSM-dev] [osmosis-dev] Proposal for a multithreaded PBF reader

Jochen Topf jochen at remote.org
Wed Apr 29 18:00:40 UTC 2015

On Mi, Apr 29, 2015 at 10:55:57 -0600, Martijn van Exel wrote:
> That's useful, but still does not allow you to optimize threading
> because you don't know in advance how many blocks there are, or is
> there a way to know / estimate this based on the '~8k' block size
> (from the wiki)?

Why would you need the number of blocks? Just use a work queue and max out the
number of CPUs you have with threads. Usually the number of blocks will be
far larger than the number of CPUs. (And if not, the file is small and it
doesn't matter really.)

Jochen Topf  jochen at remote.org  http://www.jochentopf.com/  +49-351-31778688

More information about the dev mailing list