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.
Created attachment 137657 [details] Snapshot When I ask to build a Maven project, either from context menu or F11 or whatever, very often the IDE spends several seconds computing something before the Output Window even opens. No progress is shown during this time; there is no feedback of any kind that the IDE even registered your request to run a build. I captured a profiler snapshot showing RunUtils.run calling MavenEmbedder.readProjectWithDependencies, taking >9s in my case. Please show a progress bar or something during this time.
the problem is in some of the prerequisites checkers calling getMavenProject() that is lazily computed. The progress bar is then only created in MavenCommandLineExecutor.run(). But to get there from RunUtils.run() we need to pass RunUtils.executeMaven() both of which are friend apis and each has it's own usecases. On top of that the progresshandle needs to be passed an Action in constructor that knows about MavenCommandLineExecutor fields. I don't see a simple fix here. Maybe some sort of workaround that would just print something to the status bar..
The progress handle is the ideal place to show this, but just emitting a message to the status bar as soon as the action is invoked (*) would help a lot in terms of perceived responsiveness: would keep me from wondering whether my finger only grazed the F11 key. Sometimes I wind up running a build twice because there was no apparent response from the IDE the first time. (*) IIRC you can set this notification to get cleared deterministically when the build is actually starting, so it would not be a distraction to people whose builds start quickly. I guess you could even start a timer when the action is invoked and show the message only if ~300ms has elapsed without prerequisite checkers or whatever completing.
maybe org.openide.util.Utilities.createProgressCursor() for the time until we reach the progress bar?
That sounds right.
http://hg.netbeans.org/core-main/rev/37593675cc6a
A progress cursor is fine, but I fear that showing a glass pane will just make the problem worse: not only will I have to wait ten seconds before my build starts, but I will be unable to do any other work during that time. A simple status line message seems less intrusive.
not in my experience, I've added a Thread.sleep() and any activity on my side seemed work fine
Integrated into 'main-silver', will be available in build *201307262300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/37593675cc6a User: Milos Kleint <mkleint@netbeans.org> Log: #233275 show some kind of progress indication before we reach the actual execution with a progress bar.