void () { final StringBuilder sb = new StringBuilder(); final 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(Math.abs(random.nextInt())).append("\" +\n"); } sb.append(" \"\");\n}"); final PsiJavaFile file = (PsiJavaFile)createLightFile("SOE_test.java", sb.toString()); long t = System.currentTimeMillis(); final StubElement tree = NEW_BUILDER.buildStubTree(file); t = System.currentTimeMillis() - t; assertEquals("PsiJavaFileStub []\n" + " IMPORT_LIST:PsiImportListStub\n" + " CLASS:PsiClassStub[name=SOE_test fqn=SOE_test]\n" + " MODIFIER_LIST:PsiModifierListStub[mask=4096]\n" + " TYPE_PARAMETER_LIST:PsiTypeParameterListStub\n" + " EXTENDS_LIST:PsiRefListStub[EXTENDS_LIST:]\n" + " IMPLEMENTS_LIST:PsiRefListStub[IMPLEMENTS_LIST:]\n" + " FIELD:PsiFieldStub[BIG:BigInteger=;INITIALIZER_NOT_STORED;]\n" + " MODIFIER_LIST:PsiModifierListStub[mask=4096]\n", DebugUtil.stubTreeToString(tree)); System.out.println("SOE depth=" + i + ", time=" + t + "ms"); }