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.
Opening java file in java project if editor is already opened takes about 500 ms. Opening servlet file in web project takes about 1400 ms. The difference should not be so big.
What does "opening servlet" mean - is that invoking the Open action or creating a new servlet using wizard ? In another words - is that problem of wizard or bad implementation of open action? In servlet wizard I can imagine some improvements but Open action for servlet should be exactly the same as Open action for java class as servlet doesn't have its specific DataObject now.
It's opening existing servlet, so without use of wizards.
So the 1 sec difference is caused by additional jars in classpath. If I try to open Servlet in java project with empty classpath it takes about 500 ms. If I add Servlet API to classpath then opening time increase to about 1500 ms.
it may be related to this (but I have not tested it): cvs commit -m "47167 do not register the listeners every time a change even is fired" dd\DDDataObject.java (in directory E:\nb_all\web\core\src\org\netbeans\modules\web\) Checking in dd/DDDataObject.java; /cvs/web/core/src/org/netbeans/modules/web/dd/DDDataObject.java,v <-- DDDataObject.java new revision: 1.47; previous revision: 1.46 done
I thought that it can parse more than one file (inheritance hierarchy) but this is not truth in dev build from Aug 23. The AST is created only for a servlet that is opened.
The right cause why the test measured greater time was because test waited for full editor painting and it included code folding and other annotations. Without waiting on anottations opening servlet is almost as fast as opening java.
Thank you Libor for the detailed investigation.