[josm-dev] Jumbo Patch v3 (or so)

Gabriel Ebner ge at gabrielebner.at
Mon Dec 17 23:41:02 GMT 2007


On Mon, Dec 17, 2007 at 08:33:33AM -0800, Dave Hansen wrote:
> In any case, all of the stuff that you describe here sounds like bugs in
> my implementation more than fundamental limitation.  I could be wrong,
> but I'm unconvinced that there are fundamental problems with
> reverse-lookup.  We'll see how painful it is to keep my patch
> synchronized.  That may change my mind.

The fundamental problems aren't with reverse lookup.  They're with storing
that information in the Node objects.  OsmPrimitive instances were never meant
to carry reverse-lookup information.

Sure, you can modify the data model so heavily that this will work, but I
think that'll be too painful.  I just can't think of any way to solve these
problems without adding a new dispose() method to OsmPrimitive and then doing
manual memory management.

IMHO the best way around that would be to have a HashMap<Node, HashSet<Way>>
in DataSet, to be updated by the Command subclasses, and a rebuildCache()
method for when it's too cumbersome to manually update the cache.

  Gabriel.




More information about the josm-dev mailing list