This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 180230 - Groovy indexing slowness
Summary: Groovy indexing slowness
Status: VERIFIED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Grails (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 normal with 5 votes (vote)
Assignee: Tomas Zezula
URL:
Keywords: PERFORMANCE
: 141895 179108 179874 181590 197271 197646 200456 206967 210133 210243 223173 (view as bug list)
Depends on: 196812
Blocks: 179727
  Show dependency tree
 
Reported: 2010-02-03 13:10 UTC by akochnev
Modified: 2013-03-14 13:51 UTC (History)
41 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 163995


Attachments
A thread dump from netbeans while parsing (182.53 KB, application/octet-stream)
2010-02-03 13:10 UTC, akochnev
Details
A thread dump of completing a property name (161.46 KB, application/octet-stream)
2010-04-19 22:24 UTC, akochnev
Details
A thread dump of method completion (129.45 KB, application/octet-stream)
2010-04-19 22:31 UTC, akochnev
Details
nps snapshot (32.27 KB, application/nps)
2011-04-05 10:30 UTC, rohitbrai
Details
nps snapshot (9.36 KB, application/nps)
2011-04-23 08:50 UTC, Exceptions Reporter
Details
full messages.log file w/ FINE log level for repository updater (288.08 KB, application/octet-stream)
2011-12-14 19:38 UTC, akochnev
Details
Spreadsheet w/ groovy parsing timings (13.78 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-12-19 18:11 UTC, akochnev
Details
Updated spreadsheet w/ groovy parsing analysis (16.48 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-12-20 22:20 UTC, akochnev
Details
profiler snapshot of groovy parsing performance (6.39 MB, application/octet-stream)
2011-12-21 16:09 UTC, akochnev
Details
Source file scan still very slow on 7.2 beta (1.95 KB, text/plain)
2012-05-10 07:31 UTC, waynezhang
Details
Patched groovy module (1.04 MB, application/octet-stream)
2012-05-17 14:57 UTC, Tomas Zezula
Details
Indexing log (5.14 KB, text/plain)
2012-05-22 03:21 UTC, waynezhang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description akochnev 2010-02-03 13:10:57 UTC
Created attachment 93817 [details]
A thread dump from netbeans while parsing

In a medium size Grails project, hitting Ctrl+Space to get code completion, pegs the one processor of my dual core laptop for 50+ seconds before displaying the code completion box. 

Attached is a thread dump that I captured while all of this was happening.
Comment 1 Petr Hejl 2010-02-10 08:38:02 UTC
Looks like the Groovy sources were parsed on CC. It is not clear from the thread dump whether is was valid (=> performance problem) or invalid (=> some defect in parsing cache).

Can you share your project for testing?
Comment 2 akochnev 2010-02-11 04:10:57 UTC
I can't provide a project as an example; however, I'm working on two completely different and unrelated Grails projects (one medium size, one small), and both of them are afflicted by unusable code completion because of the slow response (the medium size is more affected - each attempt to invoke code completion results in one CPU of my dual core to peg to 100% for 50 seconds)

I'm not sure if there was any caching of the Code Completion data that happens, as the 50+ second freeze-up happens every time I invoke code completion, not just the first time). 

Is there anything else (logs, special thread dumps) that I can provide to help move this forward ?
Comment 3 Petr Hejl 2010-03-23 12:07:21 UTC
Can you provide couple of thread dumps and exact context where you invoke code completion (which object etc)? Is there any "scanning" progress bar?

CC can be hugely affected by the number and size of the plugins. So while the project is small it can be really huge because of all the plugins used in it.
Comment 4 Petr Hejl 2010-04-19 14:45:33 UTC
Additional info requested...
Comment 5 akochnev 2010-04-19 22:17:20 UTC
The "Scanning" progress bar is not on. 

I have a class that looks like this: 

class Foo extends FooParent {
    static transients = ["model"]

    def getModel() { }

    Bar baraba

    
    def foo() {
        this.bar<Ctrl-Space>
    }
}

When I hit Ctrl-Space after typing the first couple of letters of the "baraba" property, the IDE goes into a tail spin for 30 seconds, pegging one of the processors on my dual core laptop to 100% usage and the other one to 50% usage. This is the exception report filed from that : http://statistics.netbeans.org/analytics/exception.do?id=373426

When I try to invoke code completion to see the method on the object, I type in this.bar.<Ctrl-Space>, and a similar event happens - I wait for 30+ seconds with the one CPU completely consumed by the process. The performance exception is at : http://statistics.netbeans.org/analytics/exception.do?id=373435 - although the exception says it waited for 22 seconds, I think it was more than that. 

The project is a medium size grails project, w/ about 300 files in it (e.g. 70 domain objects, just as many controllers, a few services and and about 170 views/templates). The project contains 15 plugins (including a few that come out of the box w/ grails):
* acegi, audit-logging, build-test-data, code-coverage, falcone-util, fsm, hibernate, image-tools, jasper, jquery, mail, quartz, selenium-rc, tomcat, webflow)
Comment 6 akochnev 2010-04-19 22:24:32 UTC
Created attachment 97674 [details]
A thread dump of completing a property name
Comment 7 akochnev 2010-04-19 22:31:02 UTC
Created attachment 97675 [details]
A thread dump of method completion
Comment 8 Petr Hejl 2010-05-12 14:27:19 UTC
*** Bug 181590 has been marked as a duplicate of this bug. ***
Comment 9 akochnev 2010-08-27 00:10:35 UTC
Tested in 6.9.1 and 6.10M1 - the code completion performance is much better, albeit still slower than Java code completion. 

I would be comfortable if this issue is closed, as the code completion performance is not horrible.
Comment 10 Petr Hejl 2011-02-19 10:12:29 UTC
Not horrible anymore - P3.
Comment 11 Petr Hejl 2011-03-31 09:14:34 UTC
*** Bug 197271 has been marked as a duplicate of this bug. ***
Comment 12 Petr Hejl 2011-03-31 09:52:39 UTC
The completion is slow due to slow Groovy parser which we reuse. We would have to write our own IDE optimized parser. Not doable with current resources.
Comment 13 rohitbrai 2011-04-05 10:30:43 UTC
Created attachment 107504 [details]
nps snapshot
Comment 14 Exceptions Reporter 2011-04-23 08:50:19 UTC
Created attachment 107914 [details]
nps snapshot
Comment 15 Petr Jiricka 2011-05-12 08:50:33 UTC
No choice but to waive this for 7.0.1 as well.
Comment 16 Petr Hejl 2011-05-23 11:59:22 UTC
*** Bug 197646 has been marked as a duplicate of this bug. ***
Comment 17 Petr Hejl 2011-09-14 10:08:05 UTC
*** Bug 200456 has been marked as a duplicate of this bug. ***
Comment 18 akochnev 2011-12-14 19:32:33 UTC
After doing a rebuild from main (w/ groovy 1.9beta jar) and applying a couple of my patches (http://netbeans.org/bugzilla/show_bug.cgi?id=206199, http://netbeans.org/bugzilla/show_bug.cgi?id=206198 ), I'm seeing a massive slowdown in indexing . I'm not yet 100% that the slowdown comes from my fixes , although they could be contributing to it by adding a large number of jar files to the project classpath. 



Below is a sample of a snippet from the repository updater log (note the 6,202,072 ms to finish scanning) :

INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /home/akochnev/gitroot/fooProject/grails-app/entities took: 1091273 ms (New or modified files: 210, Deleted files: 0) [Adding listeners took: 14 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Complete indexing of 25 source roots took: 6197884 ms (New or modified files: 557, Deleted files: 0) [Adding listeners took: 249 ms]
FINE [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: RootsWork@7f5b9df6[followUpJob=false, checkEditor=false, useInitialState=true finished: {
FINE [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]:   scannedRoots2Dependencies(25)=
  file:/home/akochnev/gitroot/fooProject/data/:
  file:/home/akochnev/gitroot/fooProject/devData/:
  file:/home/akochnev/gitroot/fooProject/grails-app/conf/:
  file:/home/akochnev/gitroot/fooProject/grails-app/controllers/:
  file:/home/akochnev/gitroot/fooProject/grails-app/domain/:
  file:/home/akochnev/gitroot/fooProject/grails-app/entities/:
  file:/home/akochnev/gitroot/fooProject/grails-app/realms/:
  file:/home/akochnev/gitroot/fooProject/grails-app/services/:
  file:/home/akochnev/gitroot/fooProject/grails-app/taglib/:
  file:/home/akochnev/gitroot/fooProject/grails-app/utils/:
  file:/home/akochnev/gitroot/fooProject/helpData/:
  file:/home/akochnev/gitroot/fooProject/hornetq/:
  file:/home/akochnev/gitroot/fooProject/mailDump/:
  file:/home/akochnev/gitroot/fooProject/masterData/:
  file:/home/akochnev/gitroot/fooProject/migration/:
  file:/home/akochnev/gitroot/fooProject/private/:
  file:/home/akochnev/gitroot/fooProject/scripts/:
  file:/home/akochnev/gitroot/fooProject/solr/:
  file:/home/akochnev/gitroot/fooProject/src/groovy/:
  file:/home/akochnev/gitroot/fooProject/src/java/:
  file:/home/akochnev/gitroot/fooProject/target/:
  file:/home/akochnev/gitroot/fooProject/test/consistency/:
  file:/home/akochnev/gitroot/fooProject/test/integration/:
  file:/home/akochnev/gitroot/fooProject/test/unit/:
  jar:file:/usr/local/java/groovybeans-dev/ide/jsstubs/allstubs.zip!/:
FINE [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]:   scannedBinaries(168)=
  file:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/classes/
  jar:file:/home/akochnev/gitroot/fooProject/lib/SymJavaAPI.jar!/
  jar:file:/home/akochnev/gitroot/fooProject/lib/jms.jar!/
  jar:file:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/charsets.jar!/
  jar:file:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/dnsns.jar!/
  jar:file:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/localedata.jar!/
  jar:file:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/sunjce_provider.jar!/
  jar:file:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/sunpkcs11.jar!/
  jar:file:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/jce.jar!/
  jar:file:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/jsse.jar!/
  jar:file:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/modules/jdk.boot.jar!/
  jar:file:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/resources.jar!/
  jar:file:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/rt.jar!/
  jar:file:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/sunrsasign.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-bootstrap-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-core-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-crud-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-docs-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-hibernate-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-plugin-codecs-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-plugin-controllers-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-plugin-converters-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-plugin-datasource-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-plugin-domain-class-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-plugin-filters-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-plugin-gsp-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-plugin-i18n-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-plugin-logging-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-plugin-mimetypes-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-plugin-scaffolding-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-plugin-services-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-plugin-servlets-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-plugin-testing-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-plugin-tomcat-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-plugin-url-mappings-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-plugin-validation-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-resources-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-scripts-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-spring-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-test-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-test-suite-base-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-web-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/dist/grails-webflow-1.4.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/antlr/antlr/jars/antlr-2.7.6.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/antlr/antlr/jars/antlr-2.7.7.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/aopalliance/aopalliance/jars/aopalliance-1.0.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/backport-util-concurrent/backport-util-concurrent/jars/backport-util-concurrent-3.1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/bouncycastle/bcmail-jdk14/jars/bcmail-jdk14-138.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/bouncycastle/bcprov-jdk14/jars/bcprov-jdk14-138.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/cglib/cglib-nodep/jars/cglib-nodep-2.1_3.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/com.google.protobuf/protobuf-java/jars/protobuf-java-2.3.0.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/com.googlecode.concurrentlinkedhashmap/concurrentlinkedhashmap-lru/jars/concurrentlinkedhashmap-lru-1.1_jdk5.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/com.googlecode.json-simple/json-simple/jars/json-simple-1.1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/com.h2database/h2/jars/h2-1.2.147.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/com.lowagie/itext/jars/itext-2.1.7.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/com.springsource.springloaded/springloaded-core/jars/springloaded-core-0.8.0.RELEASE.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/commons-beanutils/commons-beanutils/jars/commons-beanutils-1.7.0.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/commons-beanutils/commons-beanutils/jars/commons-beanutils-1.8.0.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/commons-cli/commons-cli/jars/commons-cli-1.2.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/commons-codec/commons-codec/jars/commons-codec-1.4.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/commons-collections/commons-collections/jars/commons-collections-3.2.1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/commons-dbcp/commons-dbcp/jars/commons-dbcp-1.3.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/commons-digester/commons-digester/jars/commons-digester-1.6.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/commons-el/commons-el/jars/commons-el-1.0.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/commons-fileupload/commons-fileupload/jars/commons-fileupload-1.2.1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/commons-io/commons-io/jars/commons-io-1.4.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/commons-lang/commons-lang/jars/commons-lang-2.4.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/commons-logging/commons-logging/jars/commons-logging-1.1.1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/commons-pool/commons-pool/jars/commons-pool-1.5.5.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/commons-validator/commons-validator/jars/commons-validator-1.3.1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/dom4j/dom4j/jars/dom4j-1.6.1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/hsqldb/hsqldb/jars/hsqldb-1.8.0.10.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/javassist/javassist/jars/javassist-3.11.0.GA.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/javax.servlet.jsp/jsp-api/jars/jsp-api-2.1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/javax.servlet/jsp-api/jars/jsp-api-2.0.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/javax.servlet/jstl/jars/jstl-1.1.2.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/javax.servlet/servlet-api/jars/servlet-api-2.5.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/javax.transaction/jta/jars/jta-1.1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/javax.validation/validation-api/jars/validation-api-1.0.0.GA.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/jboss/javassist/jars/javassist-3.7.ga.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/jdom/jdom/jars/jdom-1.0.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/jline/jline/jars/jline-0.9.94.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/junit/junit/jars/junit-3.8.2.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/junit/junit/jars/junit-4.8.1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/log4j/log4j/bundles/log4j-1.2.16.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/net.java.dev.jna/jna/jars/jna-3.2.2.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/net.sf.ehcache/ehcache-core/jars/ehcache-core-2.3.1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/net.sf.ehcache/ehcache/jars/ehcache-1.5.0.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/net.sf.jsr107cache/jsr107cache/jars/jsr107cache-1.0.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/ognl/ognl/jars/ognl-2.7.3.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/opensymphony/sitemesh/jars/sitemesh-2.4.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.antlr/antlr-runtime/jars/antlr-runtime-3.1.3.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.antlr/stringtemplate/jars/stringtemplate-3.2.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.apache.ant/ant-junit/jars/ant-junit-1.8.2.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.apache.ant/ant-launcher/jars/ant-launcher-1.8.2.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.apache.ant/ant-trax/jars/ant-trax-1.7.1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.apache.ant/ant/jars/ant-1.8.2.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.apache.ivy/ivy/jars/ivy-2.2.0.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.apache.tomcat.embed/tomcat-embed-core/jars/tomcat-embed-core-7.0.8.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.apache.tomcat.embed/tomcat-embed-jasper/jars/tomcat-embed-jasper-7.0.8.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.apache.tomcat.embed/tomcat-embed-logging-log4j/jars/tomcat-embed-logging-log4j-7.0.8.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.apache.tomcat/tomcat-annotations-api/jars/tomcat-annotations-api-7.0.8.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.apache.tomcat/tomcat-api/jars/tomcat-api-7.0.8.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.apache.tomcat/tomcat-catalina-ant/jars/tomcat-catalina-ant-7.0.8.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.apache.tomcat/tomcat-catalina/jars/tomcat-catalina-7.0.8.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.apache.tomcat/tomcat-coyote/jars/tomcat-coyote-7.0.8.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.apache.tomcat/tomcat-juli/jars/tomcat-juli-7.0.8.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.apache.tomcat/tomcat-servlet-api/jars/tomcat-servlet-api-7.0.8.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.apache.tomcat/tomcat-util/jars/tomcat-util-7.0.8.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.aspectj/aspectjrt/jars/aspectjrt-1.6.10.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.aspectj/aspectjweaver/jars/aspectjweaver-1.6.10.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.bouncycastle/bcmail-jdk14/jars/bcmail-jdk14-1.38.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.bouncycastle/bcpg-jdk15/jars/bcpg-jdk15-1.45.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.bouncycastle/bcprov-jdk14/jars/bcprov-jdk14-1.38.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.bouncycastle/bcprov-jdk15/jars/bcprov-jdk15-1.45.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.bouncycastle/bctsp-jdk14/jars/bctsp-jdk14-1.38.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.coconut.forkjoin/jsr166y/jars/jsr166y-070108.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.codehaus.gant/gant_groovy1.8/jars/gant_groovy1.8-1.9.5.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.codehaus.gpars/gpars/jars/gpars-0.9.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.codehaus.groovy/groovy-all/jars/groovy-all-1.8.0.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.fusesource.jansi/jansi/jars/jansi-1.2.1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.grails/grails-datastore-gorm/jars/grails-datastore-gorm-1.0.0.BUILD-SNAPSHOT.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.grails/grails-datastore-gorm/jars/grails-datastore-gorm-1.0.0.M6.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.grails/grails-gdoc-engine/jars/grails-gdoc-engine-1.0-SNAPSHOT.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.grails/grails-gdoc-engine/jars/grails-gdoc-engine-1.0.1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.hibernate.java-persistence/jpa-api/jars/jpa-api-2.0-cr-1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.hibernate.javax.persistence/hibernate-jpa-2.0-api/jars/hibernate-jpa-2.0-api-1.0.0.Final.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.hibernate/hibernate-commons-annotations/jars/hibernate-commons-annotations-3.2.0.Final.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.hibernate/hibernate-core/jars/hibernate-core-3.6.1.Final.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.hibernate/hibernate-ehcache/jars/hibernate-ehcache-3.6.1.Final.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.hibernate/hibernate-validator/jars/hibernate-validator-4.1.0.Final.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.slf4j/jcl-over-slf4j/jars/jcl-over-slf4j-1.6.1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.slf4j/jul-to-slf4j/jars/jul-to-slf4j-1.6.1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.slf4j/slf4j-api/jars/slf4j-api-1.6.1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.slf4j/slf4j-log4j12/jars/slf4j-log4j12-1.6.1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework.uaa/org.springframework.uaa.client/bundles/org.springframework.uaa.client-1.0.1.RELEASE.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework.webflow/spring-binding/jars/spring-binding-2.0.8.RELEASE.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework.webflow/spring-js/jars/spring-js-2.0.8.RELEASE.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework.webflow/spring-webflow/jars/spring-webflow-2.0.8.RELEASE.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework/spring-aop/jars/spring-aop-3.1.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework/spring-asm/jars/spring-asm-3.1.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework/spring-aspects/jars/spring-aspects-3.1.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework/spring-beans/jars/spring-beans-3.1.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework/spring-context-support/jars/spring-context-support-3.1.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework/spring-context/jars/spring-context-3.1.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework/spring-core/jars/spring-core-3.1.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework/spring-datastore-core/jars/spring-datastore-core-1.0.0.M6.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework/spring-datastore-simple/jars/spring-datastore-simple-1.0.0.M6.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework/spring-expression/jars/spring-expression-3.1.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework/spring-jdbc/jars/spring-jdbc-3.1.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework/spring-jms/jars/spring-jms-3.1.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework/spring-orm/jars/spring-orm-3.1.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework/spring-test/jars/spring-test-3.1.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework/spring-tx/jars/spring-tx-3.1.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework/spring-web/jars/spring-web-3.1.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.springframework/spring-webmvc/jars/spring-webmvc-3.1.0.M1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.tmatesoft.sqljet/sqljet/jars/sqljet-1.0.3.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.tmatesoft.svnkit/svnkit/jars/svnkit-1.3.4.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.tmatesoft.svnkit/trilead-ssh2/jars/trilead-ssh2-build213-svnkit-1.3-patch.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/org.xhtmlrenderer/core-renderer/jars/core-renderer-R8.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/oro/oro/jars/oro-2.0.8.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/rome/rome/jars/rome-0.9.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/taglibs/standard/jars/standard-1.1.2.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/xalan/serializer/jars/serializer-2.7.1.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/xml-apis/xml-apis/jars/xml-apis-1.0.b2.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/xml-apis/xml-apis/jars/xml-apis-1.3.04.jar!/
  jar:file:/usr/local/java/grails-1.4.0.M1/lib/xpp3/xpp3_min/jars/xpp3_min-1.1.4c.jar!/
FINE [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]:   scannedRoots2Peers(25)=
  file:/home/akochnev/gitroot/fooProject/data/:
  file:/home/akochnev/gitroot/fooProject/devData/:
  file:/home/akochnev/gitroot/fooProject/grails-app/conf/:
  file:/home/akochnev/gitroot/fooProject/grails-app/controllers/:
  file:/home/akochnev/gitroot/fooProject/grails-app/domain/:
  file:/home/akochnev/gitroot/fooProject/grails-app/entities/:
  file:/home/akochnev/gitroot/fooProject/grails-app/realms/:
  file:/home/akochnev/gitroot/fooProject/grails-app/services/:
  file:/home/akochnev/gitroot/fooProject/grails-app/taglib/:
  file:/home/akochnev/gitroot/fooProject/grails-app/utils/:
  file:/home/akochnev/gitroot/fooProject/helpData/:
  file:/home/akochnev/gitroot/fooProject/hornetq/:
  file:/home/akochnev/gitroot/fooProject/mailDump/:
  file:/home/akochnev/gitroot/fooProject/masterData/:
  file:/home/akochnev/gitroot/fooProject/migration/:
  file:/home/akochnev/gitroot/fooProject/private/:
  file:/home/akochnev/gitroot/fooProject/scripts/:
  file:/home/akochnev/gitroot/fooProject/solr/:
  file:/home/akochnev/gitroot/fooProject/src/groovy/:
  file:/home/akochnev/gitroot/fooProject/src/java/:
  file:/home/akochnev/gitroot/fooProject/target/:
  file:/home/akochnev/gitroot/fooProject/test/consistency/:
  file:/home/akochnev/gitroot/fooProject/test/integration/:
  file:/home/akochnev/gitroot/fooProject/test/unit/:
  jar:file:/usr/local/java/groovybeans-dev/ide/jsstubs/allstubs.zip!/:
FINE [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: } ====
FINE [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.perf]: Indexing finished, indexing took 6,202,072 ms.
FINE [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Finished RootsWork@7f5b9df6[followUpJob=false,
Comment 19 akochnev 2011-12-14 19:38:05 UTC
Created attachment 114194 [details]
full messages.log file w/ FINE log level for repository updater
Comment 20 Martin Janicek 2011-12-15 14:57:50 UTC
Regarding discussion from issue 206198, it seems that the Groovy 1.9Beta-4 improves parser speed significantly. Could anyone else confirm that the current state is more usable?
Comment 21 akochnev 2011-12-19 18:10:05 UTC
I did a whole bunch of runs w/ different Groovy versions (1.8.4, 1.9.beta4, 2.0beta) and I have not found any significant performance differences (thus making it preferable to just run w/ the latest version. I did not compare the parsing performance to 1.6.x parsing speed. 

Still, it is unfortunate that parsing through Groovy takes as long as it does (e.g. 5 seconds per file , ranging between 1 and 11 seconds per file). I'll attach a spreadsheet w/ the findings - in summary, it takes 1hr+ for NetBeans to parse through this codebase (which is not THAT big).
Comment 22 akochnev 2011-12-19 18:11:38 UTC
Created attachment 114320 [details]
Spreadsheet w/ groovy parsing timings
Comment 23 akochnev 2011-12-20 22:20:42 UTC
Created attachment 114376 [details]
Updated spreadsheet w/ groovy parsing analysis

The updated spreadsheet contains data w/ groovy parsing performance when the proper classpath is populated in the project. The first set of timings contain only 46 jars on the classpath ; the second set of numbers (run w/ groovy 2.0beta) have~250 jars. Unfortunately, the degradation in scan performance is approximately linear to the number of dependencies (e.g. the second set of scans has 5x times the number of jar files as dependencies resulting in approximately 3x slowdown in scan performance (roughly 15 seconds per groovy file)
Comment 24 akochnev 2011-12-21 14:53:40 UTC
I think that with the latest findings it would be damaging to ship the next netbeans version w/ the current performance issues in Groovy parsing. Having Grails take 1-3 hours to parse through a medium-sized project is a non-starter. This ticket is already at P2, this problem probably doesn't warrant a P1 but it's serious enough if NetBeans continues to ship with and claim Groovy support.

Particularly, when the Grails project is fixed to include all its compile time dependencies (e.g. http://netbeans.org/bugzilla/show_bug.cgi?id=206199), the performance really becomes unacceptable. The alternative is to revert the Grails project to its previously broken state where it wouldn't be able to resolve the dependencies of the project but at least complete in a reasonable amount of time.
Comment 25 akochnev 2011-12-21 16:09:26 UTC
Created attachment 114397 [details]
profiler snapshot of groovy parsing performance
Comment 26 Martin Janicek 2012-01-04 15:48:04 UTC
*** Bug 179108 has been marked as a duplicate of this bug. ***
Comment 27 Martin Janicek 2012-01-04 15:51:58 UTC
*** Bug 179874 has been marked as a duplicate of this bug. ***
Comment 28 Martin Janicek 2012-01-04 16:00:46 UTC
*** Bug 141895 has been marked as a duplicate of this bug. ***
Comment 29 Martin Janicek 2012-01-06 10:23:39 UTC
*** Bug 206967 has been marked as a duplicate of this bug. ***
Comment 30 Martin Janicek 2012-04-02 07:06:36 UTC
*** Bug 210133 has been marked as a duplicate of this bug. ***
Comment 31 athompson 2012-04-04 16:05:19 UTC
is this being worked on?  not only does it make parsing slow but it makes CC unusable.
Comment 32 Marian Mirilovic 2012-04-04 16:39:53 UTC
133 ERs, 9 direct duplicates, 3 votes & 3 waivers in a row - so no way to waive it for 7.2 ... clear P1
Comment 33 Tomas Zezula 2012-04-19 13:58:12 UTC
This issue has 2 parts:
1st) The code completion slowness
2nd) The indexing slowness.
So it has to be split into the 2 issues as these issues are independent.

I will keep this one for indexing as it seems as more significant problem. Indexing of the project with 231 groovy files takes more than 2 hours on my Mac.

The code completion should not parse entire project, it should parse just the file in which the code completion was invoked (at most). In Java we created an incremental parser which is able to reparse, reattribute and reflow only the block to make the editor faster.
Comment 34 Tomas Zezula 2012-04-19 14:15:02 UTC
I've created the code completion issue #211466.
Comment 35 athompson 2012-04-19 15:37:15 UTC
BTW, as of late indexing, while still slow, is substantially faster than it was at its worst.   It used to take 30 minutes to index a small project and now it's about 3 or so.  YMMV.
Comment 36 Tomas Zezula 2012-04-19 15:44:51 UTC
In reply to comment #35.
This holds only for small groovy projects. The indexing of the groovy (grails) project has 2 parts.
1st) Indexing binaries - done by java
2nd) Indexing sources.

The 1st) was significantly improved in dev (7.2): fixes in indexers, change of infrastructure to make it more robust when "bad" indexers are used, parallel scan of binaries. More details can be found here: http://wiki.netbeans.org/IndexingPerformance72.

But for bigger projects, I have a test grails project with 231 groovy files, it's still a pain. The indexing takes more than 2 hours on my 2.4 GHz Intel Core i5.
Comment 37 Tomas Zezula 2012-04-19 19:06:26 UTC
Fixed jet-main f922c00b2e35
On my mid size test project the fix reduces the scan time from 31 minutes to 1 minute.
Comment 38 akochnev 2012-04-19 20:12:05 UTC
Any idea when that might show up in a daily build or web-main ? I checked jet-main (on hg.netbeans.org) but I don't see the changeset there yet. I can't wait to try this out (my scan times are about 2-3 hrs).
Comment 39 Tomas Zezula 2012-04-19 20:22:33 UTC
Should be already part of jet-main:

http://hg.netbeans.org/jet-main/rev/c7e4711635d2
http://hg.netbeans.org/jet-main/rev/f922c00b2e35

We have problems with repository merges so I  don't know when it gets into web-main.
But you can try to pick just these two change sets, both of them are needed.
Comment 40 akochnev 2012-04-20 17:28:30 UTC
OMG, I almost cannot believe what I'm seeing.. I picked up the fixes from web-main, rebuilt, blew away the netbeans home dir (to get a full reindex), and then fired it up. Within just a couple of seconds, the "scanning" was done/ 

The first time it happened, I thought something was broken (compare indexing time for the same project in this issue, a 6,202,072ms (old scan time)/2476ms = 2500x times increase in scanning performance ??). 

I checked the Go To Type and Go To File to see that the files were actually in the index, and they were. 

Code completion (e.g. on invoking ".") is still slow but the numbers on scanning the project are just unbelievable ! 

FINE [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]:   scannedRoots2Peers(28)=
  file:/home/akochnev/gitroot/marketplace/data/:
  file:/home/akochnev/gitroot/marketplace/devData/:
  file:/home/akochnev/gitroot/marketplace/grails-app/application/:
  file:/home/akochnev/gitroot/marketplace/grails-app/conf/:
  file:/home/akochnev/gitroot/marketplace/grails-app/controllers/:
  file:/home/akochnev/gitroot/marketplace/grails-app/domain/:
  file:/home/akochnev/gitroot/marketplace/grails-app/entities/:
  file:/home/akochnev/gitroot/marketplace/grails-app/infrastructure/:
  file:/home/akochnev/gitroot/marketplace/grails-app/realms/:
  file:/home/akochnev/gitroot/marketplace/grails-app/services/:
  file:/home/akochnev/gitroot/marketplace/grails-app/taglib/:
  file:/home/akochnev/gitroot/marketplace/grails-app/utils/:
  file:/home/akochnev/gitroot/marketplace/helpData/:
  file:/home/akochnev/gitroot/marketplace/hornetq/:
  file:/home/akochnev/gitroot/marketplace/liveData/:
  file:/home/akochnev/gitroot/marketplace/mailDump/:
  file:/home/akochnev/gitroot/marketplace/masterData/:
  file:/home/akochnev/gitroot/marketplace/migration/:
  file:/home/akochnev/gitroot/marketplace/private/:
  file:/home/akochnev/gitroot/marketplace/scripts/:
  file:/home/akochnev/gitroot/marketplace/solr/:
  file:/home/akochnev/gitroot/marketplace/src/groovy/:
  file:/home/akochnev/gitroot/marketplace/src/java/:
  file:/home/akochnev/gitroot/marketplace/target/:
  file:/home/akochnev/gitroot/marketplace/test/consistency/:
  file:/home/akochnev/gitroot/marketplace/test/integration/:
  file:/home/akochnev/gitroot/marketplace/test/unit/:
  jar:file:/usr/local/java/groovybeans-dev/ide/jsstubs/allstubs.zip!/:
FINE [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: } ====
FINE [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.perf]: Indexing finished, indexing took 2,476 ms.
FINE [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Finished RootsWork@6052a67f[followUpJob=false, checkEditor=false, useInitialState=true in 2,476 ms with result Interrupted
FINE [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: scheduled = false
Comment 41 Tomas Zezula 2012-04-20 19:23:55 UTC
The code completion should be also a bit faster as I made the parser attribution faster but there may be some other problems in it like ineffective usage of index, etc. If you can generate a npss snapshot of the code completion and attach it I would appreciate it. I don't have a real groovy project so it's hard for me to test.
Thanks!
Comment 42 Quality Engineering 2012-04-21 09:57:00 UTC
Integrated into 'main-golden', will be available in build *201204210400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f922c00b2e35
User: Tomas Zezula <tzezula@netbeans.org>
Log: #180230:Groovy indexing slowness
Comment 43 Martin Janicek 2012-04-23 10:44:48 UTC
*** Bug 210243 has been marked as a duplicate of this bug. ***
Comment 44 waynezhang 2012-05-10 07:30:03 UTC
Scanning source files in Grails project is still very slow. It takes more than two minutes (132,150 ms) to completed scan 647 source/text files. 

On the contrary, scanning/indexing binary files (jars) are very quick, it only takes 48 seconds to indexing 113 jar files (not very small files, include grails libraries and dependencies).

The above result is tested on NetBeans 7.2 beta pre-release version(netbeans-7.2beta-201205031832-ml.zip). 

For the details, please see the attachment.
Comment 45 waynezhang 2012-05-10 07:31:59 UTC
Created attachment 119247 [details]
Source file scan still very slow on 7.2 beta
Comment 46 Tomas Zezula 2012-05-10 07:54:17 UTC
>It takes more than
>two minutes (132,150 ms) to completed scan 647 source/text files.
Scanning 647 groovy files took something like 2 hours in NB 7.1 :-)
So it not slow, it's 5 files per second. There is some constant time per source root needed to create groovy compiler and load transformers. Having big number of small roots is worse than small number of bigger roots. The groovy parser is also affected by IO performance and load.
Can you attach nps?
Comment 47 waynezhang 2012-05-16 01:32:37 UTC
Yes, there are lots of improvement, but it is still not ideal. Since scanning binaries is much quicker, is it possible to compile the source file then scan the class files instead?
Comment 48 waynezhang 2012-05-16 02:41:16 UTC
Of the 647 files, most of them are binary classes (it scans grails build folder target and target-elipse, which have 381 files). There are only 68 source files - 43 Groovy source files and 25 Java source files.

Scanning Groovy files is still quite slow, it takes about 2 to 5 seconds to scan each groovy file. Scanning Java source files is OK, it takes about 152ms each (3814/25), about 10 times faster than Groovy file.

It seems something should be done for the Groovy indexer/parser, by the Groovy community or the NetBeans team.

Thanks!


----------
grails-app\controllers took: 42,575 ms (New or modified files: 10, Deleted files: 0) 
test\unit took: 27,930 ms (New or modified files: 11, Deleted files: 0) 
grails-app\conf took: 21,070 ms (New or modified files: 10, Deleted files: 0) 
src\groovy took: 16,311 ms (New or modified files: 9, Deleted files: 0) 
grails-app\realms took: 11,737 ms (New or modified files: 2, Deleted files: 0) 
src\java took: 3,814 ms (New or modified files: 25, Deleted files: 0)
scripts took: 2,372 ms (New or modified files: 1, Deleted files: 0) 

target-eclipse took: 822 ms (New or modified files: 232, Deleted files: 0) 
target took: 760 ms (New or modified files: 147, Deleted files: 0) 
tools took: 682 ms (New or modified files: 4, Deleted files: 0)
Comment 49 Tomas Zezula 2012-05-17 14:50:16 UTC
>Since scanning binaries is much quicker
Yes, it does not need parsing and expensive attribution. Also the class file is very compact.
>is it possible to compile the source file then scan the class files >instead?
Unfortunately not. The class file does not contain all needed information. Also using classes from an user build directory does not work. If user cleans it the metadata are gone. Also when you change or delete a source file the metadata will be incorrect - you will need to compile the source file after change. In fact this is what java indexer does when you save source file it is compiled into caches. So in case of groovy you will need to run groovy compiler which has the same overhead.

>Scanning Groovy files is still quite slow, it takes about 2 to 5 seconds to
>scan each groovy file. 
There are several problem with groovy. 1st) Compiler creation is quite expensive, it's better to have more files in single source root than lots of source root with 1 file as each root is independent compilation unit and a new compiler has to be created. The  second problem is that groovy uses class loading for attribution which is slow.

>Scanning Java source files is OK, it takes about 152ms each (3814/25), about 10 times faster than Groovy file.
Right. The java compiler is significantly faster and also I do lots of things to help the compiler in java.source.
Regarding the groovy I added caching and mainly I delegate the attribution to java.source which is significantly faster. This speeded the groovy indexing in order of magnitude 60 - 100 times for my two test projects in 7.2.

I also have an additional patch which speeds it up 2 - 3 times in addition to previous fix but it will require clean up and I don't have a time now for now as I am busy with my work. Another problem is that I have only 2 test grails projects so I will need someone to test it and let me know.

In general the groovy indexing has to be slower then java because it delegates to java and it adds its own overhead.
Comment 50 Tomas Zezula 2012-05-17 14:57:11 UTC
Created attachment 119579 [details]
Patched groovy module

If someone wants to help, (s)he can try to measure the source scan time in NB 7.2 and then replace the groovy editor module with a patched file, delete the cache dir, measure the scan again and compare the scan times.
Please when doing the measurement run the IDE with disabled asserts as it's in release (-J-da option). There are several expensive assertions in the patch.
Comment 51 waynezhang 2012-05-21 07:49:02 UTC
Tested it with a medium sized Grails project (Java source files: 80, Groovy source files: 192, GSP files: 88) and test indexing time (NetBeans 7.2 beta pre-release) takes about 15 minutes (910 seconds):

Complete indexing of 35 source roots took: 910,781 ms (New or modified files: 2,223, Deleted files: 0)

Open the same project with Eclipse (Spring Tool Suite 2.8.1) and indexing ready (Tested by deleting all the *.index files in org.eclipse.jdt.core in the Eclipse workspace - .metadata, restart eclipse. when Groovy files can be searched by CTRL+SHIFT+T. I can't find the indexing log in Eclipse), it takes about 1 minutes 40 seconds (about 10 times faster).

Although lots of enhancement has been done by this task, I think further work still needed to make Grails/Groovy project indexing usable. When this issue has been marked resolved, I have checked several NetBeans builds and tested. I can't found too much difference (very slow vs slow), I was always wondering if this fix has been integrated.

I think a new issue/bug to should be created to do the remaining work.
Comment 52 waynezhang 2012-05-21 08:06:44 UTC
For the project tested above (15 minutes scanning), Grails compile only takes about 30 seconds:

(1) Grails clean
(2) Grails compile

Since indexing/scanning binary files is much quicker than Groovy source files, for Grails project, it is possible to trigger a Grails compile before a cold indexing (the first time) and then indexing on the binary classes files instead (in the target folder)?

If that possible, the indexing time should be with in 2 minutes. I guess Eclipse (STS) indexing on class files, not Groovy source files.

Thanks!
Comment 53 Marian Petras 2012-05-21 09:04:05 UTC
Tomáš, I thought about it a little bit and here are my ideas (possibly naive because I have very weak knowledge of Groovy and the current state of the code that performs indexing).

My guess reason for complaints about slow indexing is that people cannot use features like "Go To Type" until the indexing is complete. The hints below aim at this particular problem.


= two-phase indexing (1: from compiled code; 2: from source code) =

You wrote that you cannot parse just the compiled code because it does not contain all the required information. Maybe you could split the generation of index into two phases:

In the first phase, binary code would be indexed, thus gathering as much data as possible (names of classes, methods, ...). Once complete (which should be quick), the generated index would be passed to the IDE, thus allowing users to use navigation features like Go To Type.

Then the second phase would be started, which would read and parse also source files, thus adding more information to the index (and possibly modifying some parts of it).


= only re-index code that might have been changed =

Do not regenerate index if there are no signs of any change since the last time the respective project has been opened (and indexed). E.g. once the index for a particular project is generated, save timestamps of all the files used for indexing (plus other relevant information such as platform, OS, etc.). When the project (or the whole IDE) is opened, first compare the saved timestamps with actual timestamps of the files. If there are no changes, do not re-index at all.

This could be combined with the above-mentioned two-phase indexing. E.g. you might find, by the time-stamp comparison, that none of the binary files has changed but some source files had been modified. In this case, you could skip the first phase of indexing and only parse the source files.


= keep and use the previous index until the new one is fully generated =

The idea is that people might prefer an outdated index over no index. I mean that you would provide the (possibly outdated) index to the IDE until the new index is generated.

This could be combined with the above-mentioned two-phase indexing:
Until the first phase of re-indexing is complete, you would provided the outdated index.
Once the first phase of re-indexing is complete, but before the second phase is complete, you would use the up-to-date data generated during the first phase plus the (possibly) outdated additional data that are only available from the source files.

If this is implemented, UI of actions that use the index should be changed slightly such that it would display a decent message that the index being used might not be up-to-date.
Comment 54 Tomas Zezula 2012-05-21 09:46:26 UTC
Hi Marian!

>= two-phase indexing (1: from compiled code; 2: from source code) =
For libs that provide binaries or have sources as non normative the binaries are used.
The binaries are always scanned before sources. When the root is scanner the data
are available in Go To Type. In Java in NB 7.2 we do a bit more for main project we provide file list in GTT before the class list is created.

>= only re-index code that might have been changed =
This is how it works, only files witch changed time stamps are reindexed.

>= keep and use the previous index until the new one is fully generated = 
Transactional index in NB 7.2 which does exactly what you described
Comment 55 Tomas Zezula 2012-05-21 09:52:08 UTC
To waynezhang:
Thanks for testing but I don't see the measured numbers with the applied patch.
Didn't you forgot to attach them?

>I can't found too much difference (very slow vs slow)
60 - 100 times depending on the project.
Comment 56 Tomas Zezula 2012-05-21 14:57:10 UTC
As it may be harder to test the binary module due to module dependencies. I've integrated part of the patch into jet main 52efe5d9d0fe. When a build is available I will send a link.
Comment 57 Tomas Zezula 2012-05-21 19:14:55 UTC
I'v needed to change the patch a bit (jet-main 2ed0283e69a5) due to the fix of issue #206811 which made the resolveFromCU and resolveToClass asymmetric. The fix of #206811 hurts performance as it forces the parametrized types to be loaded by slow class loader even they were already resolved by javac.
Comment 58 waynezhang 2012-05-22 03:21:54 UTC
Created attachment 119710 [details]
Indexing log

The attachment (index.txt) is the medium sized Grails project indexing log on NetBeans 7.2 beta pre-release.

It takes about 15 minutes.

System Info: 
  Product Version         = NetBeans IDE 7.2 Beta (Build 201205031832) (#41d3eb3428ac)
  Operating System        = Windows XP version 5.1 running on x86
  Java; VM; Vendor        = 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21; Oracle Corporation
  Runtime                 = Java(TM) SE Runtime Environment 1.7.0_04-b20
Comment 59 Tomas Zezula 2012-05-22 08:57:14 UTC
The build 201205031832 is quite old. Waynezhang, I need you to test it with a build having the recent changes. Unfortunately it's not yet part of the daily build, but you can download it here: http://bertram-tst.netbeans.org:8080/job/jet-main/6065/artifact/nbbuild/NetBeans-dev-jet-main-6065-on-20120521-full.zip
Don't forgot to use -J-da IDE command line options. It would be great if you can share your project with me I can look why the groovy compiler is slow. If not I need at least following info:

1st) Run the build from http://bertram-tst.netbeans.org:8080/job/jet-main/6065/artifact/nbbuild/NetBeans-dev-jet-main-6065-on-20120521-full.zip
with -J-da command line option and attach the log.

2nd) Delete cache dir and start the IDE with -J-da command line option and when the groovy indexes source create a IDE self profile and attach it to this issue. Look here http://wiki.netbeans.org/FitnessViaPartnership to find out how to generate IDE self profile.

Regarding using the binaries. It will not work as explained in comment #49. In addition none of the two groovy projects is compilable and each file save will require complete project rebuild due to inferred errors. In java the source indexing is faster compared to compilation when there is enough of memory and OPCW can be used. In java we need to do complete compile cycle because of Compile On Save. This is not true for Groovy. The groovy support does not need to do class files and as far as I know the groovy support does not support flow analyses (not sure about it as I don't work on groovy and I don't know if missing flow analyses is a feature or a bug). So in fact the source scanning can be comparable to compilation. The groovy.support has some additional overhead to allow mixed mode (the java editor can use groovy types) but it's something about 5%.
Comment 60 Quality Engineering 2012-05-22 15:53:27 UTC
Integrated into 'main-golden', will be available in build *201205220903* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/52efe5d9d0fe
User: Tomas Zezula <tzezula@netbeans.org>
Log: #180230:Groovy indexing slowness
Comment 61 waynezhang 2012-05-31 09:57:18 UTC
I can't download the source code from the link in comment #59. I tested it again with the latest build (20120528, don't know if the latest change has been integrated), it is much faster than version 7.1.2. Scanning/indexing the same project improved from 45 minutes to about 5 minutes, 9 times faster. It would be great if the scanning time will be less than 2 minutes.

Keep on the good work, Thanks!

===========

  Product Version         = NetBeans IDE Dev (Build 201205280002) (#3c75442ef118)
  Operating System        = Windows XP version 5.1 running on x86
  Java; VM; Vendor        = 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21; Oracle Corporation
  Runtime                 = Java(TM) SE Runtime Environment 1.7.0_04-b20
  
  INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Complete indexing of 36 source roots took: 292,008 ms (New or modified files: 2,290, Deleted files: 0) [Adding listeners took: 486 ms]
  
  -----------------
  
  Product Version         = NetBeans IDE 7.1.2 (Build 201204101705) (#0d549f9bc1e4)
  Operating System        = Windows XP version 5.1 running on x86
  Java; VM; Vendor        = 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21; Oracle Corporation
  Runtime                 = Java(TM) SE Runtime Environment 1.7.0_04-b20
  
  INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Complete indexing of 36 source roots took: 2756060 ms (New or modified files: 2290, Deleted files: 0) [Adding listeners took: 469 ms]
Comment 62 Tomas Zezula 2012-06-04 18:17:53 UTC
>I tested it again with the latest build (20120528, don't know if the latest change has been
>integrated).
Yes it contains the latest change.

>It would be great if the scanning time will be less than 2 minutes.
I believe it's possible there are still 3 things which I think can be improved.

1st) On my notebook some time is spent in listing empty folders during attribution. I am not sure if it's just my personal problem caused by small amount of physical memory or it's general problem. This can be fixed and it may also help to java performance, so it's my job :-)

2nd) The groovy indexer performs groovy compiler phase up to generate phase (in fact it generates but does not write class files - I am not sure if it's needed by Transformers or not but I think this should be eliminated or at least some parts of it should be eliminated. Currently it's most expensive part of indexing.

3rd) The groovy indexer does parsing and attribution twice. The first parse is caused by groovy VirtualSourceProvider and second by indexing itself. The second parse is significantly faster due to OS disk caches and attribution caches I've added in NB 7.2 but it still takes time. In NB 7.2 the languages infrastructure is transactional and the second parse can be completely eliminated.
Comment 63 Martin Janicek 2012-12-04 14:41:37 UTC
*** Bug 223173 has been marked as a duplicate of this bug. ***
Comment 64 Tomas Zezula 2013-01-29 14:29:48 UTC
While fixing some regressions in groovy indexing in NB 7.3 I've improved a bit behaviour of the CompilationUnit cache which may improve significantly the performance on large projects, tested on gravl-0.4. For details see issue #225458. The fix os scheduled for NB 8.0, can someone with another large groovy project  test the fix?
Thanks
Comment 65 akochnev 2013-02-02 06:08:47 UTC
I re-opened the same project as before, the summary info is below. 


Overall, one thing that seemed to be different is that loading the project (e.g. the part where no source roots are shown and the nodes under the main project node say something like "initializing...") took a couple of minutes, seemingly longer than previously (I can try to provide more precise info is 'a couple of minutes' needs more accuracy). I do recall that during project initialization, the project attempts to read some of the setting directly from the project itself. 

The scanning of the jars seemed to take longer than before : 76,898 ms. 

Unfortunately, I wasn't able to see a summary output line that would indicate how long it took to scan the groovy sources (like it used to say - e.g. "Complete
indexing of XXX source roots took:).

-----------------

Log Session: Friday, February 1, 2013 11:51:29 PM EST
>System Info: 
  Product Version         = NetBeans IDE Dev (Build 201302010001) (#b70b1fabd3bc)
  Operating System        = Linux version 3.5.0-22-generic running on amd64
  Java; VM; Vendor        = 1.6.0_26; Java HotSpot(TM) 64-Bit Server VM 20.1-b02; Sun Microsystems Inc.
  Runtime                 = Java(TM) SE Runtime Environment 1.6.0_26-b03
  Java Home               = /usr/lib/jvm/java-6-sun-1.6.0.26/jre
  System Locale; Encoding = en_US (nb); UTF-8
  Home Directory          = /home/polrtex
  Current Directory       = /home/polrtex
  User Directory          = /home/polrtex/.netbeans/dev
  Cache Directory         = /home/polrtex/.cache/netbeans/dev
  Installation            = /usr/local/java/netbeans-dev-201302010001/nb
                            /usr/local/java/netbeans-dev-201302010001/ergonomics
                            /usr/local/java/netbeans-dev-201302010001/ide
                            /usr/local/java/netbeans-dev-201302010001/java
                            /usr/local/java/netbeans-dev-201302010001/apisupport
                            /usr/local/java/netbeans-dev-201302010001/webcommon
                            /usr/local/java/netbeans-dev-201302010001/websvccommon
                            /usr/local/java/netbeans-dev-201302010001/enterprise
                            /usr/local/java/netbeans-dev-201302010001/profiler
                            /usr/local/java/netbeans-dev-201302010001/harness
                            /usr/local/java/netbeans-dev-201302010001/groovy
                            /usr/local/java/netbeans-dev-201302010001/javafx
                            /usr/local/java/netbeans-dev-201302010001/platform
  Boot & Ext. Classpath   = /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/resources.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/rt.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/jsse.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/jce.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/charsets.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/modules/jdk.boot.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/classes:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/sunjce_provider.jar
  Application Classpath   = /usr/local/java/netbeans-dev-201302010001/platform/lib/boot.jar:/usr/local/java/netbeans-dev-201302010001/platform/lib/org-openide-modules.jar:/usr/local/java/netbeans-dev-201302010001/platform/lib/org-openide-util.jar:/usr/local/java/netbeans-dev-201302010001/platform/lib/org-openide-util-lookup.jar:/usr/local/java/netbeans-dev-201302010001/platform/lib/locale/boot_ja.jar:/usr/local/java/netbeans-dev-201302010001/platform/lib/locale/boot_pt_BR.jar:/usr/local/java/netbeans-dev-201302010001/platform/lib/locale/boot_ru.jar:/usr/local/java/netbeans-dev-201302010001/platform/lib/locale/boot_zh_CN.jar:/usr/local/java/netbeans-dev-201302010001/platform/lib/locale/org-openide-modules_ja.jar:/usr/local/java/netbeans-dev-201302010001/platform/lib/locale/org-openide-modules_pt_BR.jar:/usr/local/java/netbeans-dev-201302010001/platform/lib/locale/org-openide-modules_ru.jar:/usr/local/java/netbeans-dev-201302010001/platform/lib/locale/org-openide-modules_zh_CN.jar:/usr/local/java/netbeans-dev-201302010001/platform/lib/locale/org-openide-util_ja.jar:/usr/local/java/netbeans-dev-201302010001/platform/lib/locale/org-openide-util-lookup_ja.jar:/usr/local/java/netbeans-dev-201302010001/platform/lib/locale/org-openide-util-lookup_pt_BR.jar:/usr/local/java/netbeans-dev-201302010001/platform/lib/locale/org-openide-util-lookup_ru.jar:/usr/local/java/netbeans-dev-201302010001/platform/lib/locale/org-openide-util-lookup_zh_CN.jar:/usr/local/java/netbeans-dev-201302010001/platform/lib/locale/org-openide-util_pt_BR.jar:/usr/local/java/netbeans-dev-201302010001/platform/lib/locale/org-openide-util_ru.jar:/usr/local/java/netbeans-dev-201302010001/platform/lib/locale/org-openide-util_zh_CN.jar:/usr/lib/jvm/java-6-sun/lib/dt.jar:/usr/lib/jvm/java-6-sun/lib/tools.jar
  Startup Classpath       = /usr/local/java/netbeans-dev-201302010001/platform/core/org-openide-filesystems.jar:/usr/local/java/netbeans-dev-201302010001/platform/core/core.jar:/usr/local/java/netbeans-dev-201302010001/platform/core/locale/core_zh_CN.jar:/usr/local/java/netbeans-dev-201302010001/platform/core/locale/org-openide-filesystems_ru.jar:/usr/local/java/netbeans-dev-201302010001/platform/core/locale/core_pt_BR.jar:/usr/local/java/netbeans-dev-201302010001/platform/core/locale/org-openide-filesystems_pt_BR.jar:/usr/local/java/netbeans-dev-201302010001/platform/core/locale/org-openide-filesystems_ja.jar:/usr/local/java/netbeans-dev-201302010001/platform/core/locale/core_ja.jar:/usr/local/java/netbeans-dev-201302010001/platform/core/locale/core_ru.jar:/usr/local/java/netbeans-dev-201302010001/platform/core/locale/org-openide-filesystems_zh_CN.jar:/usr/local/java/netbeans-dev-201302010001/nb/core/org-netbeans-upgrader.jar:/usr/local/java/netbeans-dev-201302010001/nb/core/locale/org-netbeans-upgrader_ru.jar:/usr/local/java/netbeans-dev-201302010001/nb/core/locale/org-netbeans-upgrader_zh_CN.jar:/usr/local/java/netbeans-dev-201302010001/nb/core/locale/org-netbeans-upgrader_ja.jar:/usr/local/java/netbeans-dev-201302010001/nb/core/locale/org-netbeans-upgrader_pt_BR.jar:/usr/local/java/netbeans-dev-201302010001/nb/core/locale/core_nb.jar
-------------------------------------------------------------------------------

INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Complete indexing of 245 binary roots took: 76,898 ms
Comment 66 Tomas Zezula 2013-02-02 11:19:55 UTC
Thanks Alex for testing.
Unfortunately the source indexing time is the only important thing regarding the issue #225458.
Neither the project open time not the binary indexing are affected. If you have compared the times to NB 7.2.x these times are affected by the fix of the issue #206199: web-main #64d25569108c. The fix added number of jars to be scanned to compile dependencies. However before it the grails project cp was wrong.
If I create NB 7.3 build with the patch included and attach the URL to it can you try it?
Thanks
Comment 67 akochnev 2013-02-02 15:34:14 UTC
Tomas - I can certainly test the change if you give me a build that contains the change. Please let me know if I have to do anything special (startup args and such) to get the log to display how much time it took to parse the sources (as it didn't seem to show it in the logs yesterday).
Comment 68 Tomas Zezula 2013-02-03 13:42:05 UTC
Thanks Alex.
Here is the link https://dl.dropbox.com/u/79648505/netbeans.zip to the NB 7.3 with the patch included.
The patch should improve an indexing of the bigger amount of groovy sources (1500+) in single project. For small project it has no effect. For my artificial project (1600 groovy files) it reduced the indexing from 9 minutes to 5.
Comment 69 Petr Cyhelsky 2013-02-04 09:56:07 UTC
(In reply to comment #64)
> While fixing some regressions in groovy indexing in NB 7.3 I've improved a bit
> behaviour of the CompilationUnit cache which may improve significantly the
> performance on large projects, tested on gravl-0.4. For details see issue
> #225458. The fix os scheduled for NB 8.0, can someone with another large groovy
> project  test the fix?
> Thanks

I've tested the fix on 3,5k files grails project on old slow win XP the result is:
before patch:   8,853,093 ms
with patch:     2,738,553 ms

that is more than 3x faster -the patch is good candidate for 7.3 patch 1
Comment 70 akochnev 2013-02-06 04:25:11 UTC
In my testing, especially with the repository updater previously not logging the parsing time of all my sources, and missing some of the dependencies on this project, it's not possible to say if it has improved or gotten worse. On the same project that I had provided data on before, I got the following info. 

In summary, three minutes for this project is quite decent. I'll see if I can open the same project in 7.2 and see if I get corresponding numbers to compare this to. 

----------- 

INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/masterData took: 1,524 ms (New or modified files: 15, Deleted files: 0) [Adding listeners took: 3 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/private took: 204 ms (New or modified files: 5, Deleted files: 0) [Adding listeners took: 3 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /home/polrtex/Downloads/netbeans/ide/jsstubs/domstubs.zip took: 2,444 ms (New or modified files: 133, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /home/polrtex/Downloads/netbeans/ide/jsstubs/corestubs.zip took: 1,090 ms (New or modified files: 31, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /home/polrtex/Downloads/netbeans/ide/jsstubs/reststubs.zip took: 520 ms (New or modified files: 11, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/grails-app/application took: 3,893 ms (New or modified files: 8, Deleted files: 0) [Adding listeners took: 1 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/liveData took: 87 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/solr took: 516 ms (New or modified files: 90, Deleted files: 0) [Adding listeners took: 8 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/hornetq took: 319 ms (New or modified files: 6, Deleted files: 0) [Adding listeners took: 1 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/helpData took: 332 ms (New or modified files: 3, Deleted files: 0) [Adding listeners took: 1 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/grails-app/controllers took: 24,807 ms (New or modified files: 64, Deleted files: 0) [Adding listeners took: 2 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/src/groovy took: 5,878 ms (New or modified files: 19, Deleted files: 0) [Adding listeners took: 3 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/grails-app/realms took: 1,575 ms (New or modified files: 2, Deleted files: 0) [Adding listeners took: 1 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/grails-app/conf took: 7,668 ms (New or modified files: 75, Deleted files: 0) [Adding listeners took: 11 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/test/integration took: 16,365 ms (New or modified files: 48, Deleted files: 0) [Adding listeners took: 7 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/test/consistency took: 2,689 ms (New or modified files: 16, Deleted files: 0) [Adding listeners took: 2 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/grails-app/infrastructure took: 15,868 ms (New or modified files: 52, Deleted files: 0) [Adding listeners took: 4 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/migration took: 650 ms (New or modified files: 70, Deleted files: 0) [Adding listeners took: 10 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/grails-app/services took: 29,441 ms (New or modified files: 140, Deleted files: 0) [Adding listeners took: 9 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/scripts took: 4,581 ms (New or modified files: 22, Deleted files: 0) [Adding listeners took: 2 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/grails-app/taglib took: 6,770 ms (New or modified files: 22, Deleted files: 0) [Adding listeners took: 2 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Complete indexing of 28 source roots took: 291,805 ms (New or modified files: 1,418, Deleted files: 0) [Adding listeners took: 144 ms]
Comment 71 akochnev 2013-02-06 04:55:55 UTC
I ran the same project indexing in 7.2 , turns out that there is no significant improvement for my project size : 

INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/mailDump took: 1,804 ms (New or modified files: 11, Deleted files: 0) [Adding listeners took: 1 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/data took: 206 ms (New or modified files: 1, Deleted files: 0) [Adding listeners took: 1 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/devData took: 234 ms (New or modified files: 22, Deleted files: 0) [Adding listeners took: 2 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /usr/local/java/netbeans-7.2/ide/jsstubs/allstubs.zip took: 1,806 ms (New or modified files: 189, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/test/unit took: 15,299 ms (New or modified files: 12, Deleted files: 0) [Adding listeners took: 3 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/src/java took: 8,969 ms (New or modified files: 26, Deleted files: 0) [Adding listeners took: 4 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/grails-app/utils took: 53,914 ms (New or modified files: 259, Deleted files: 0) [Adding listeners took: 17 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/grails-app/domain took: 31 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 1 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/grails-app/entities took: 46,955 ms (New or modified files: 266, Deleted files: 0) [Adding listeners took: 11 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/masterData took: 949 ms (New or modified files: 15, Deleted files: 0) [Adding listeners took: 2 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/private took: 151 ms (New or modified files: 5, Deleted files: 0) [Adding listeners took: 2 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/grails-app/application took: 2,174 ms (New or modified files: 8, Deleted files: 0) [Adding listeners took: 1 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/liveData took: 31 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/solr took: 202 ms (New or modified files: 90, Deleted files: 0) [Adding listeners took: 8 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/hornetq took: 135 ms (New or modified files: 6, Deleted files: 0) [Adding listeners took: 1 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/helpData took: 148 ms (New or modified files: 3, Deleted files: 0) [Adding listeners took: 1 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/grails-app/controllers took: 17,412 ms (New or modified files: 64, Deleted files: 0) [Adding listeners took: 2 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/src/groovy took: 4,185 ms (New or modified files: 19, Deleted files: 0) [Adding listeners took: 2 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/grails-app/realms took: 1,484 ms (New or modified files: 2, Deleted files: 0) [Adding listeners took: 1 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/grails-app/conf took: 5,669 ms (New or modified files: 75, Deleted files: 0) [Adding listeners took: 6 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/test/integration took: 13,259 ms (New or modified files: 48, Deleted files: 0) [Adding listeners took: 6 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/test/consistency took: 1,337 ms (New or modified files: 16, Deleted files: 0) [Adding listeners took: 1 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/grails-app/infrastructure took: 8,534 ms (New or modified files: 52, Deleted files: 0) [Adding listeners took: 2 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/migration took: 425 ms (New or modified files: 70, Deleted files: 0) [Adding listeners took: 5 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/grails-app/services took: 24,134 ms (New or modified files: 140, Deleted files: 0) [Adding listeners took: 7 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/scripts took: 3,206 ms (New or modified files: 22, Deleted files: 0) [Adding listeners took: 1 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /fooProject/grails-app/taglib took: 5,339 ms (New or modified files: 22, Deleted files: 0) [Adding listeners took: 1 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Complete indexing of 27 source roots took: 217,992 ms (New or modified files: 1,443, Deleted files: 0) [Adding listeners took: 89 ms]
Comment 72 Tomas Zezula 2013-02-06 18:14:33 UTC
Thanks Alex for help!
Petr Cyhelsky did measurement on some artificial big grails project having (3,5K groovy files). As the project was big enough and the measurement was done on Windows (slow FS) there was 3x performance improvement. Anyway it's late to include the patch into NB 7.3 so it will be part of a 7.3.x or 8.0.
Thanks again!
Comment 73 Marian Mirilovic 2013-03-06 17:27:18 UTC
Based on previous comments, I think we can say it's VERIFIED .. so please proceed with integration into release73, thanks in advance.
Comment 74 Tomas Zezula 2013-03-14 09:00:59 UTC
The 73patch1-candidate is non sense as the fix is already a part of the NB 7.2 the 73patch1-candidate is for the issue #225458 which was tested in this issue.
Comment 75 Marian Mirilovic 2013-03-14 10:14:46 UTC
(In reply to comment #74)
> The 73patch1-candidate is non sense as the fix is already a part of the NB 7.2
> the 73patch1-candidate is for the issue #225458 which was tested in this issue.

I am fine with that, nominated by Petr Jiricka .. so Petr ?
Comment 76 Tomas Zezula 2013-03-14 10:24:29 UTC
>I am fine with that, nominated by Petr Jiricka .. so Petr ?
You probably don't understand what I've written. There is nothing to transplant as the fix of this ussue is there for more than year. :-) The 73patch1-candidate was added by a mistake, it should be on issue #225458 and fortunately it's there, so I've transplanted the issue #225458.
Comment 77 Marian Mirilovic 2013-03-14 11:17:47 UTC
(In reply to comment #76)
> >I am fine with that, nominated by Petr Jiricka .. so Petr ?
> You probably don't understand what I've written. There is nothing to transplant
> as the fix of this ussue is there for more than year. :-) The
> 73patch1-candidate was added by a mistake, it should be on issue #225458 and
> fortunately it's there, so I've transplanted the issue #225458.

No Tomas, I understand that pretty well, just wanted to emphasis that the one replying to this issue regarding your note should be Petr, not me.
Comment 78 Petr Jiricka 2013-03-14 13:51:55 UTC
> nominated by Petr Jiricka

Sorry, my mistake, this is the wrong issue.