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 178848 - [68cat] MainProjectAction.refreshView blocks EQ
Summary: [68cat] MainProjectAction.refreshView blocks EQ
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords: PERFORMANCE
: 186231 (view as bug list)
Depends on: 177262 187621
Blocks: 163201
  Show dependency tree
 
Reported: 2009-12-18 06:43 UTC by misterm
Modified: 2010-06-15 23:32 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 159835


Attachments
nps snapshot (256.00 KB, application/nps)
2009-12-18 06:43 UTC, misterm
Details
Patch to avoid blocking EQ (6.44 KB, patch)
2010-04-13 00:40 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description misterm 2009-12-18 06:43:33 UTC
Build: NetBeans IDE 6.8 (Build 200912041610)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_04-b12
OS: Windows XP, 5.1, x86

User Comments:
mgoe: Starting Netbeans 6.8beta.

GUEST: Initiation of Netbeans. Opening projects


Maximum slowness yet reported was 18016 ms, average is 9253
Comment 1 misterm 2009-12-18 06:43:39 UTC
Created attachment 92755 [details]
nps snapshot
Comment 2 Antonin Nebuzelsky 2010-03-29 14:11:33 UTC
Change of default owner.
Comment 3 Jesse Glick 2010-04-13 00:40:12 UTC
Making MainProjectAction enablement run off EQ seems easy enough, but then this would seem to contradict work done in bug #163201 which I do not really follow the purpose of.
Comment 4 Jesse Glick 2010-04-13 00:40:34 UTC
Created attachment 97131 [details]
Patch to avoid blocking EQ
Comment 5 Jaroslav Tulach 2010-04-13 04:56:28 UTC
I don't think there is any contradiction. Your patch just performs computation of the state outside of EQ and later notifies the change in EQ. The bug 163201 does the same as far as I can tell. Feel free to apply.
Comment 6 Jesse Glick 2010-04-13 14:54:42 UTC
In order for your test to pass I needed to delete

assertTrue("Need to be called from AWT thread", EventQueue.isDispatchThread());

and I was not sure what the purpose of this assertion was; the point of my patch is precisely to _not_ call these methods from EQ.
Comment 7 Jaroslav Tulach 2010-04-14 04:43:02 UTC
Feel free to remove the asserts in the test. I made them to verify that the MainProjectAction delays its initialization until it is first queried, that it does not eagerly compute something while created (outside of AWT thread).

Probably even better is to keep the asserts on while run.init(); is called, but disable them when EventQueue.invokeAndWait(run) that might correctly capture my old and your new intention.
Comment 8 Jesse Glick 2010-05-14 20:51:30 UTC
core-main #9b32aff251d0
Comment 9 Jesse Glick 2010-05-17 14:50:19 UTC
*** Bug 186231 has been marked as a duplicate of this bug. ***
Comment 10 Quality Engineering 2010-05-19 06:17:04 UTC
Integrated into 'main-golden', will be available in build *201005182201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/
User: 
Log: