Ignore:
Timestamp:
2011-06-07T19:05:14+02:00 (13 years ago)
Author:
bastiK
Message:

memory optimizations for Node & WayPoint (Patch by Gubaer, modified)

The field 'proj' in CachedLatLon is a waste of memory. For the 2 classes where this has the greatest impact, the cache for the projected coordinates is replaced by 2 simple double fields (east & north). On projection change, they have to be invalidated explicitly. This is handled by the DataSet & the GpxLayer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/osm/QuadBucketsTest.java

    r3577 r4126  
    6666    @Test
    6767    public void testRemove() throws Exception {
    68         Main.proj = new Mercator();
     68        Main.setProjection(new Mercator());
    6969        DataSet ds = OsmReader.parseDataSet(new FileInputStream("data_nodist/restriction.osm"), NullProgressMonitor.INSTANCE);
    7070        removeAllTest(ds);
     
    7373    @Test
    7474    public void testMove() throws Exception {
    75         Main.proj = new Mercator();
     75        Main.setProjection(new Mercator());
    7676        DataSet ds = OsmReader.parseDataSet(new FileInputStream("data_nodist/restriction.osm"), NullProgressMonitor.INSTANCE);
    7777
Note: See TracChangeset for help on using the changeset viewer.