[Merkaartor] Importing large GPX tracks is very slow

Yves Goergen nospam.list at unclassified.de
Mon Jan 5 20:10:13 GMT 2009


On 05.01.2009 20:59 CE(S)T, Chris Browet wrote:
> I'd say that the more nodes already in the layer, the longer it takes to
> add another due to memory allocation and layer vector re-allocation to
> fit the new content.

It's not reallocating the CommandList. You can tell the (approximate)
number of items from the value that's fed into the progress window. The
problem is that the layer.add method is used in such a generic way that
you cannot easily reserve the memory in advance.

> If you have "tags" in your GPX, it takes even longer because they are
> imported, too.

I think it's got a (useless) name. Regular GPSBabel output.

> The best way to do it would be to pre-allocate memory, but then you have
> to know in advance how many nodes in the GPX... Or maybe guess it from
> the file size?

-- 
Yves Goergen "LonelyPixel" <nospam.list at unclassified.de>
Visit my web laboratory at http://beta.unclassified.de




More information about the Merkaartor mailing list