From 25a4044131aaa06a456aa4deb79bbdbeaab768ec Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Thu, 11 Sep 2025 14:23:43 +0200 Subject: [PATCH] optimization: improve logging speed in tests GitOrigin-RevId: 320022431e40624415a8bef37b89ca1034d27b3f --- .../daemon/impl/PassExecutorService.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/PassExecutorService.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/PassExecutorService.java index 1a090d2d6a1f..a749ea00441c 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/PassExecutorService.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/PassExecutorService.java @@ -596,14 +596,12 @@ public final class PassExecutorService implements Disposable { if (LOG.isDebugEnabled()) { Document document = pass instanceof TextEditorHighlightingPass text ? text.getDocument() : null; CharSequence docText = document == null ? "" : ": '" + StringUtil.first(document.getCharsSequence(), 10, true)+ "'"; - synchronized (PassExecutorService.class) { - String message = StringUtil.repeatSymbol(' ', IdeaForkJoinWorkerThreadFactory.getThreadNum() * 4) - + " " + (pass == null ? "" : pass + " ") - + StringUtil.join(info, Functions.TO_STRING(), " ") - + "; progress=" + progressIndicator - + (docText.isEmpty() ? "" : " " + docText); - LOG.debug(message); - } + String message = StringUtil.repeatSymbol(' ', IdeaForkJoinWorkerThreadFactory.getThreadNum() * 4) + + " " + (pass == null ? "" : pass + " ") + + StringUtil.join(info, Functions.TO_STRING(), " ") + + "; progress=" + progressIndicator + + (docText.isEmpty() ? "" : " " + docText); + LOG.debug(message); } }