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.
[dev-20040811, JDK 1.4.2_04] I'm running the IDE with a clean userdir. I create a new J2SE App, fill in the wizard fields and press Finish. The next 10 seconds (or so) I'm looking at incompletely redrawn UI and waiting for the project to be created. Very poor user experience.
probably dup of issue 47072 Honza, do you have some thread-dump ?
Hmm, I don't think it's a duplicate. I'm told that issue #47072 is caused by the navigation view in Editor. However, the problem described here occurs immediately after the Project wizard is closed and before the editor is opened and the classpath scanning kicks in. I can try to generate a thread dump, of course.
Created attachment 16755 [details] A series of thread dumps taken while creating a new project
See the attached console log with 5 thread dumps captured while the new project was opening. I don't see anything related to issue #47072 there.
Jesse please look at it but I really don't think this is ours. Do you?
Doesn't look to me like it has much to do with the project system. Thread dumps: #1 - DataObject.find on a *.java file on the system file system (a template). #2 & #3 - some parsing stuff I don't understand in JavaDataObject.handleCreateFromTemplate. #4 - a mystery to me, just opening the file, not sure what it is waiting for. Four thread dumps are not enough to see any particular pattern here. Is this a regression? Since when? I do not believe anything of interest has changed in J2SEProjectGenerator etc. recently. Perhaps something new in javacore.
Problem seems to be in JavaDataObject.handleCreateFromTemplate(). See numbers. Regular instantiation of Java template: 0.25s Instantiation of Java templete during creation of very first project: 2.5s! Instantiation of Java templete during creation of project (not very first): 0.75s.
Yes, this is the problem we have talked about when we started to migrate our infrastructure to the new buildsystem. We have managed to minimize the time when AWT is blocked. The 2.5s is spent in creation of the storage partition for the new classpath element that the new file is created in. I don't see how we can minimize it significantly, so it would be helpful if the project generator could move the new file creation from the AWT thread.
Adding Petr & Jirka to CC in light of the last comment. I am not sure if it is straightforward to make the new file creation asynchronous, since after the wizard returns a Set<Object> the wizard infrastructure needs to continue working (to select newly created files and projects). Again, is this a recent problem or have the same measurements existed for a long time? I have certainly never seen a 10 second pause.
AFAIK JavaDataObject.handleCreateFromTemplate() and related code is in trunk since refactoring merge. I cannot reproduce 10s hang, but only 3s, which is still bad.
I don't think this is necessarily a regression or new problem. I just noticed yesterday that creating of a new project takes long (excluding classpath scanning, of course) and AWT is blocked. Perhaps, it just stroke me now with the new dark blue welcome screen. The gray unpainted rectangle (left after the disappearing Project wizard) on the blue background looks ugly and it doesn't update for several seconds. Another reason might be that my machine is pretty slow (PIII, 800 MHz, 384 MB RAM).
We looked at that once with Jarda I think. What helped was to move the NewFile action out of the AWT and then of course replan the node selctions etc back to AWT. I even still might have patch for it somewhere. I can try to commit it. But rathen not for the Beta1. BTW I think that this is in fact defficiency of the Wizards API which does not allow to let the wizard stay painted (but with an progess cursor) and close it after all the time consuming work is done.
Now hourglass curor is shown after creation of new project. And the wizard disappears without leaving the ugly grey box. However the creation of first project is still a bit slow. Maybe file another bug and let the performace team to investigate why. Checking in projectui/src/org/netbeans/modules/project/ui/ProjectUtilities.java; /cvs/projects/projectui/src/org/netbeans/modules/project/ui/ProjectUtilities.java,v <-- ProjectUtilities.java new revision: 1.9; previous revision: 1.8 done Processing log script arguments... More commits to come... Checking in projectui/src/org/netbeans/modules/project/ui/actions/NewProject.java; /cvs/projects/projectui/src/org/netbeans/modules/project/ui/actions/NewProject.java,v <-- NewProject.java new revision: 1.13; previous revision: 1.12 done
Can this change be integrated to the beta branch as well? Creating a new project is gonna be quite frequent step for the beta users I guess.
We decided no to.
Verified in dev-200408181800. Creating a new project for the first time still takes pretty long, but the user experience is much better. UI updates fine.