Changeset 7143 in josm for trunk/src


Ignore:
Timestamp:
2014-05-19T17:01:53+02:00 (6 years ago)
Author:
simon04
Message:

Log initialization time per mappaint style

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/SplashScreen.java

    r7005 r7143  
    2929import org.openstreetmap.josm.gui.util.GuiHelper;
    3030import org.openstreetmap.josm.tools.ImageProvider;
     31import org.openstreetmap.josm.tools.Utils;
    3132import org.openstreetmap.josm.tools.WindowGeometry;
    3233
     
    3738public class SplashScreen extends JFrame {
    3839
    39     private SwingRenderingProgressMonitor progressMonitor;
     40    private final SwingRenderingProgressMonitor progressMonitor;
    4041
    4142    /**
     
    198199            if (!prevMessageTitle.isEmpty()) {
    199200                messages.removeLast();
    200                 messages.add(tr("{0} ({1} ms)", prevMessageTitle, Long.toString(now - time)));
     201                messages.add(tr("{0} ({1})", prevMessageTitle, Utils.getDurationString(now - time)));
    201202            }
    202203            time = now;
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java

    r7082 r7143  
    206206        }
    207207        for (StyleSource source : styles.getStyleSources()) {
     208            final long startTime = System.currentTimeMillis();
    208209            source.loadStyleSource();
    209210            if (Main.pref.getBoolean("mappaint.auto_reload_local_styles", true) && source.isLocal()) {
    210211                File f = new File(source.url);
    211212                source.setLastMTime(f.lastModified());
     213            }
     214            if (Main.isDebugEnabled()) {
     215                final long elapsedTime = System.currentTimeMillis() - startTime;
     216                Main.debug("Initializing map style " + source.url + " completed in " + Utils.getDurationString(elapsedTime));
    212217            }
    213218        }
Note: See TracChangeset for help on using the changeset viewer.