Hi All,

I've just checked in some final changes for a new idTrackerType
implementation used by the --bounding-box and --bounding-polygon tasks.

It is called "Dynamic" and complements the existing "BitSet" and "IdList".
It breaks the id range into intervals of 1024, and then selects either the
BitSet or IdList tracker types for that interval based on the id density
within that range.  So for a typical --bounding-box invocation, the id
tracker will contain large numbers of both BitSet and IdList id trackers.
The implementation always starts with IdList then switches to BitSet when
the number of items in the interval exceeds 1024/32=32.

I've done some initial testing (cutting the Australian quarter of the planet
out of a file containing the southern half of the planet) and it appears to
use less memory than both BitSet and IdList for that scenario.  For
exceptionally sparse id tracking IdList may still have the edge, and for
exceptionally dense id tracking BitSet may still have the edge, but for
general use I think Dynamic should win in most cases.  It does have a
downside in that it incurs more CPU overhead.  In my test case if I sent all
data to the --write-null task it incurred approximately a 10% overhead, but
when writing the data to a compressed XML file the difference is less
pronounced.

I have enabled it as the default tracker type because I think it should be
used by most people for most scenarios.  Let me know if you encounter any
issues with it.

Cheers,
Brett
_______________________________________________
osmosis-dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/osmosis-dev

Reply via email to