void () { @Language("JAVA") String text = "class Foo { native Foo foo(); }\n" + "class Bar<T extends Foo> extends Foo {\n" + " native Bar<T> foo();" + "}\n" + "class Goo extends Bar<Goo> {}\n" + "class S { void x(Goo g) { g\n" + StringUtil.repeat(".foo()\n", 2000) + ".toString(); } }"; configureByText(JavaFileType.INSTANCE, text); PlatformTestUtil.startPerformanceTest("highlighting deep call chain", 50_000, () -> { assertEmpty(highlightErrors()); type("k"); assertNotEmpty(highlightErrors()); backspace(); }).usesAllCPUCores().assertTiming(); }