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 204526 - api.project.ui.OpenProjects.open does IO operations in AWT
Summary: api.project.ui.OpenProjects.open does IO operations in AWT
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EAR (show other bugs)
Version: 7.1
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: David Konecny
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 206311
  Show dependency tree
 
Reported: 2011-11-01 15:48 UTC by Petr Cyhelsky
Modified: 2012-04-20 10:13 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stacktrace (6.93 KB, text/plain)
2011-11-01 15:48 UTC, Petr Cyhelsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Cyhelsky 2011-11-01 15:48:21 UTC
Created attachment 112687 [details]
stacktrace

Please see the attached stacktrace.

This stacktrace was obtained during performance team search for usages of outputStream in AWT - this often causes slowness when caught by versioning or local history.

If it is absolutely necessary to do this synchronously can it at least be run using runOffEventDispatchThread ?
Comment 1 David Konecny 2011-11-02 14:02:39 UTC
I think case is OK - a project is being opened and there is progress bar running in UI that project is being open.
Comment 2 David Konecny 2011-11-02 15:39:36 UTC
After talking with Tomas about this issue I will have one more look how other projects open subprojects and make sure EAR does it the same way and no ProjectOpenHook is called from AWT.
Comment 3 David Konecny 2011-11-06 21:13:23 UTC
I looked at J2SE project and how it opens subprojects (ie. under J2SE's Libraries node select a node which represents a project which is not opened yet and call "Open" action it). Profiling the Open action I can see that the same API method (api.project.ui.OpenProjects.open) is called and whether such call results into an IO operation depends on what type the subproject is, that is what all ends up being called from project's ProjectOpenedHook.

I'm passing this issue to api.project.ui.OpenProjects.open owner to check whether ProgressUtils.runOffEventDispatchThread could be used (or something else) so that a proper UI notification is displayed in case project opening takes more time.
Comment 4 Jesse Glick 2011-11-15 15:34:50 UTC
Probably could be. Too risky for 7.1.
Comment 5 Marian Mirilovic 2012-04-16 13:04:14 UTC
Increasing priority to P2 - after discussion with performance team and based on the goal for NB 7.2 (performance improvements) especially for remote filesystems.
Comment 6 Jesse Glick 2012-04-18 20:26:24 UTC
Just need to make j2ee.earproject.ui.actions.OpenModuleProjectAction run asynch, I think.
Comment 7 David Konecny 2012-04-19 01:07:59 UTC
I made the org.netbeans.modules.j2ee.earproject.ui.actions.OpenModuleProjectAction action asynchronous.
018e81366258
Comment 8 Quality Engineering 2012-04-20 10:13:56 UTC
Integrated into 'main-golden', will be available in build *201204200400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/018e81366258
User: David Konecny <dkonecny@netbeans.org>
Log: #204526 - api.project.ui.OpenProjects.open does IO operations in AWT