Index: src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java	(revision 14829)
+++ src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java	(working copy)
@@ -89,6 +89,9 @@
     private final SelectAction selectAction = new SelectAction();
     private final SelectAndZoomAction selectAndZoomAction = new SelectAndZoomAction();
 
+    private boolean notInSync;
+    private boolean passive;
+
     /**
      * Constructs a new {@code CommandStackDialog}.
      */
@@ -375,12 +378,16 @@
     @Override
     public void commandAdded(CommandAddedEvent e) {
         if (isVisible()) {
-            undoRoot.add(getNodeForCommand(e.getCommand()));
-            undoTreeModel.nodeStructureChanged(undoRoot);
-            // fix 16911: make sure that redo tree is rebuild with empty list
-            if (!redoTreeIsEmpty())
-                buildRedoTree();
-            ensureTreesConsistency();
+            if (passive) {
+                notInSync = true;
+            } else {
+                undoRoot.add(getNodeForCommand(e.getCommand()));
+                undoTreeModel.nodeStructureChanged(undoRoot);
+                // fix 16911: make sure that redo tree is rebuild with empty list
+                if (!redoTreeIsEmpty())
+                    buildRedoTree();
+                ensureTreesConsistency();
+            }
         }
     }
 
@@ -550,4 +557,22 @@
             add(selectAndZoomAction);
         }
     }
+
+    /**
+     * Allows to set the dialog into passive mode so that updates to the undo/redo tree are ignored
+     * @param b true: enable passive mode, false: disable passive mode and rebuild dialog
+     */
+    public void setPassive(boolean b) {
+        if (passive) {
+            if (!b) {
+                passive = false;
+                if (notInSync) {
+                    buildTrees();
+                    notInSync = false;
+                }
+            }
+        } else {
+            passive = b;
+        }
+    }
 }
Index: src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java	(revision 14829)
+++ src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java	(working copy)
@@ -618,7 +618,11 @@
         @Override
         protected void realRun() throws SAXException, IOException, OsmTransferException {
             ProgressMonitor monitor = getProgressMonitor();
+            CommandStackDialog cmdStackPanel = dialogsPanel.getToggleDialog(CommandStackDialog.class);
             try {
+                if (cmdStackPanel != null && testErrors.size() > 100) {
+                    cmdStackPanel.setPassive(true);
+                }
                 monitor.setTicksCount(testErrors.size());
                 final DataSet ds = MainApplication.getLayerManager().getActiveDataSet();
                 int i = 0;
@@ -646,6 +650,9 @@
                 throw new JosmRuntimeException(e);
             } finally {
                 monitor.finishTask();
+                if (cmdStackPanel != null) {
+                    cmdStackPanel.setPassive(false);
+                }
             }
         }
     }
