void () { DocumentEx doc = new DocumentImpl(StringUtil.repeat("blah", 1000)); int N = 100_000; List<RangeMarker> markers = new ArrayList<>(N); for (int i = 0; i < N; i++) { int start = i % doc.getTextLength(); int end = start + 1; RangeMarker marker = doc.createRangeMarker(start, end); markers.add(marker); } PlatformTestUtil.startPerformanceTest(getTestName(false), 7_000, ()->{ for (int it = 0; it < 2_000; it++) { for (int i = 1; i < doc.getTextLength() - 1; i++) { boolean result = doc.processRangeMarkersOverlappingWith(i, i + 1, __ -> false); assertFalse(result); } } }).assertTiming(); assertNotEmpty(markers); }