[josm-dev] Jumbo Patch

Frederik Ramm frederik at remote.org
Mon Dec 17 23:00:35 GMT 2007


Hi,

>> If people are really concerned about memory usage and such (as in
>> "you can't keep a list of ways with every node as even the empty
>> list will consume 80 bytes") there's just no beating good old C++.
>
> Really? Oh come on, you need to know your libraries, regardless of the 
> language.

Libraries? For the task at hand I was thinking about a null-terminated
array of pointers to way objects. For every node this would mean
exactly (number of nodes in way+1) * 4 bytes. On the whole, since
nodes belong to one way on average, that would amount to 8 bytes for
every node in your dataset.

But hey, I'm not saying we must re-implement in C++, I'm just saying
*if* memory use is a concern or, more specifically, if the there are
reasonable use cases for JOSM that we want to support and where the
tradeoff between memory footprint and execution time forces us, when
using Java, to produce slow-running code because we cannot afford
indexes or cross-references or whatever, *then* we should look at C++.

If, however, we can afford to take the position that performant large-
scale editing with JOSM is out of our scope, then there's no reason
to squeeze the juice from the machine (especially as more performant
code is often less readable and more likely to be wrecked by the
uninitiated).

I am leaning towards the second interpretation, i.e. just accept it
that things get slow when you edit a whole city on last year's desktop
hardware and get on with it.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00.09' E008°23.33'





More information about the josm-dev mailing list