diff --git a/ghidra/FixConflicts.java b/ghidra/FixConflicts.java index 64362aa..dbb7e6d 100644 --- a/ghidra/FixConflicts.java +++ b/ghidra/FixConflicts.java @@ -46,6 +46,7 @@ protected void run() throws Exception { String message = "Fixing " + String.valueOf(conflicts.size()) + " conflicts..."; println(message); Instant start = Instant.now(); + Instant lastSwing = Instant.now(); monitor.initialize(conflicts.size()); monitor.setMessage(message); for (DataType dt : conflicts) { @@ -69,7 +70,14 @@ protected void run() throws Exception { } dtm.replaceDataType(dt, good, false); monitor.incrementProgress(1); - Swing.allowSwingToProcessEvents(); + + Duration swingElapsed = Duration.between(lastSwing, Instant.now()); + if (swingElapsed.toMillis() > 1000) + { + Swing.allowSwingToProcessEvents(); + lastSwing = Instant.now(); + } + Duration elapsed = Duration.between(start, Instant.now()); if (elapsed.toMillis() > 60000) {