void () { StringBuilder sb = new StringBuilder(); SecureRandom random = new SecureRandom(); sb.append("class SOE_test {\n BigInteger BIG = new BigInteger(\n"); int i; for (i = 0; i < 100000; i++) { sb.append(" \"").append(random.nextInt(Integer.MAX_VALUE)).append("\" +\n"); } sb.append(" \"\");\n}"); PsiJavaFile file = (PsiJavaFile)createLightFile("SOE_test.java", sb.toString()); long t = System.currentTimeMillis(); StubElement<?> tree = myBuilder.buildStubTree(file); t = System.currentTimeMillis() - t; assertEquals(""" PsiJavaFileStub [] IMPORT_LIST:PsiImportListStub CLASS:PsiClassStub[name=SOE_test fqn=SOE_test] MODIFIER_LIST:PsiModifierListStub[mask=0] TYPE_PARAMETER_LIST:PsiTypeParameterListStub EXTENDS_LIST:PsiRefListStub[EXTENDS_LIST:] IMPLEMENTS_LIST:PsiRefListStub[IMPLEMENTS_LIST:] FIELD:PsiFieldStub[BIG:BigInteger=;INITIALIZER_NOT_STORED;] MODIFIER_LIST:PsiModifierListStub[mask=0] """, DebugUtil.stubTreeToString(tree)); LOG.debug("SOE depth=" + i + ", time=" + t + "ms"); }