void () { withCycleConsoleNoFolding(1000, console -> PlatformTestUtil.startPerformanceTest("console print with mergeable tokens", 3500, () -> { console.clear(); for (int i=0; i<10_000_000; i++) { console.print("xxx\n", ConsoleViewContentType.NORMAL_OUTPUT); } UIUtil.dispatchAllInvocationEvents(); console.waitAllRequests(); MarkupModel model = DocumentMarkupModel.forDocument(console.getEditor().getDocument(), getProject(), true); RangeHighlighter highlighter = assertOneElement(model.getAllHighlighters()); assertEquals(new TextRange(0, console.getEditor().getDocument().getTextLength()), highlighter.getTextRange()); }).assertTiming()); }