void () { DocumentEx doc = new DocumentImpl(StringUtil.repeat("blah", 1000)); int N = 100_000; List<RangeMarker> markers = new ArrayList<>(N); PlatformTestUtil.startPerformanceTest("createRM", 2000, ()->{ 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); } for (RangeMarker marker : markers) { marker.dispose(); } }).assertTiming(); }