void () { DocumentEx doc = new DocumentImpl(StringUtil.repeat("blah", 1000)); List<RangeMarker> markers = new ArrayList<>(); int N = 100_000; 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("insert/delete string", 2000, ()->{ for (int i=0; i<15000; i++) { insertString(doc, 0, " "); deleteString(doc, 0, 1); } }).assertTiming(); for (RangeMarker rm : markers) { assertTrue(rm.isValid()); } }