optimization: improve logging speed in tests

GitOrigin-RevId: 320022431e40624415a8bef37b89ca1034d27b3f
This commit is contained in:
Alexey Kudravtsev
2025-09-11 17:08:13 +00:00
committed by intellij-monorepo-bot
parent 4d6ab68e09
commit 25a4044131
@@ -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);
}
}