Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 7041)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 7043)
@@ -1404,4 +1404,11 @@
 
         highlightWaySegments = data.getHighlightedWaySegments();
+        
+        long timeStart=0, timePhase1=0, timeFinished;
+        if (Main.isTraceEnabled()) {
+            timeStart = System.currentTimeMillis();
+            System.err.print("BENCHMARK: rendering ");
+            Main.debug(null);
+        }
 
         StyleCollector sc = new StyleCollector(drawArea, drawMultipolygon, drawRestriction);
@@ -1409,6 +1416,18 @@
         collectWayStyles(data, sc, bbox);
         collectRelationStyles(data, sc, bbox);
+        
+        if (Main.isTraceEnabled()) {
+            timePhase1 = System.currentTimeMillis();
+            System.err.print("phase 1 (calculate styles): " + (timePhase1 - timeStart) + " ms");
+        }
+        
         sc.drawAll();
         sc = null;
+
+        if (Main.isTraceEnabled()) {
+            timeFinished = System.currentTimeMillis();
+            System.err.println("; phase 2 (draw): " + (timeFinished - timePhase1) + " ms; total: " + (timeFinished - timeStart) + " ms");
+        }
+
         drawVirtualNodes(data, bbox);
     }
Index: trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 7041)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 7043)
@@ -154,4 +154,6 @@
         /** --debug                                   Print debugging messages to console */
         DEBUG(false),
+        /** --trace                                   Print detailed debugging messages to console */
+        TRACE(false),
         /** --language=&lt;language&gt;               Set the language */
         LANGUAGE(true),
@@ -318,10 +320,16 @@
         }
 
-        if (args.containsKey(Option.DEBUG)) {
+        if (args.containsKey(Option.DEBUG) || args.containsKey(Option.TRACE)) {
             // Enable JOSM debug level
             logLevel = 4;
             // Enable debug in OAuth signpost
             Preferences.updateSystemProperty("debug", "true");
-            Main.debug(tr("Print debugging messages to console"));
+            Main.info(tr("Printing debugging messages to console"));
+        }
+
+        if (args.containsKey(Option.TRACE)) {
+            // Enable JOSM debug level
+            logLevel = 5;
+            Main.info(tr("Enabled detailed debug level (trace)"));
         }
 
