Ignore:
Timestamp:
2018-05-11T23:39:43+02:00 (18 months ago)
Author:
Don-vip
Message:

fix #16260 - fix major performance problems seen during first JOSM launch:

  • new API to notify about undo/redo changes
  • use this API in Command Stack dialog to alter lightly the undo/redo trees instead of rebuilding them entirely at each command (very costly operation for large trees)
  • purge the command stack after computing the left/right traffic data to avoid starting JOSM with already many thousands nodes in undo/redo trees
  • avoid memory leak with JoinAreasAction when computing the left/right traffic data
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/RightAndLefthandTraffic.java

    r13647 r13729  
    3030import org.openstreetmap.josm.data.osm.UploadPolicy;
    3131import org.openstreetmap.josm.data.osm.Way;
     32import org.openstreetmap.josm.gui.MainApplication;
    3233import org.openstreetmap.josm.io.IllegalDataException;
    3334import org.openstreetmap.josm.io.OsmReader;
     
    135136            optimizedWays.addAll(ways);
    136137        }
     138        // Clean command stack
     139        MainApplication.undoRedo.clean(data);
    137140        return optimizedWays;
    138141    }
Note: See TracChangeset for help on using the changeset viewer.