cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

Bug 126869 - Mercurial blocking AWT thread for long periods at IDE startup.
: Mercurial blocking AWT thread for long periods at IDE startup.
Status: RESOLVED FIXED
: versioncontrol
Mercurial
: 6.1
: Sun All
: P2 (vote)
: TBD
Assigned To:
:
:
:
: PERFORMANCE
:
:
  Show dependency treegraph
 
Reported: 2008-02-06 21:51 by
Modified: 2008-02-13 16:04 (History)
Issue Type: DEFECT
:


Attachments
thread stack dump (24.20 KB, text/plain)
2008-02-06 21:52, _ pcw
Details
stack dump (22.30 KB, text/plain)
2008-02-07 00:53, _ pcw
Details
Patch not applying cleanly needs hand merged (33.53 KB, text/plain)
2008-02-08 17:02, John Rice
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-02-06 21:51:58
I started the IDE and found that the UI was frozen and unusable for about 2
minutes even though there was no classpath
scanning and the 8 projects had been completely opened.  No hourglass, no wait
indicator, just frozen.

According to stack dump (attached), Mercurial is doing a bunch of stuff on the
AWT thread.  Version control should not
be doing work on AWT thread.
------- Comment #1 From 2008-02-06 21:52:47 -------
Created an attachment (id=56198) [details]
thread stack dump
------- Comment #2 From 2008-02-06 22:09:46 -------
This is fixed in head. We have changed the menu logic so no Mercurial calls are
being made anymore in
MercurialAnnotator.getActions(). Refer to #125220



*** This issue has been marked as a duplicate of 125220 ***
------- Comment #3 From 2008-02-06 22:47:59 -------
Very strange. The patch you refer to is dated 1/17, but my build is from 1/28. 
I should already be running with it.

I will check further...
------- Comment #4 From 2008-02-07 00:52:35 -------
I upgraded my IDE to that built with the absolute latest sources (including
mercurial module) and I still see
significant file I/O on AWT thread.

See newly attached trace.  This was on opening project node in the project
explorer.  Disk cache should have been warm
and just opening the node took 15 seconds.  Is this expected behavior?
------- Comment #5 From 2008-02-07 00:53:04 -------
Created an attachment (id=56204) [details]
stack dump
------- Comment #6 From 2008-02-07 09:50:07 -------
Thanks - this is a bug in the IgnoredAction handler isEnable() that I missed
when doing the other menu changes. 

I've reviewed them all and will upload a patch. It's now taking about 3 sec to
open the main NetBeans project folder in
NetBeans. I've been trying various thread dumps during menu open and don't see
us stalled on any mercurial code.
------- Comment #7 From 2008-02-08 15:56:16 -------
This is work in progress. Attaching a  patch to clean up IgnoreAction and menu
enabling.

Still have issue of Sharability check being made in isIgnored() in annotateName
and annotateIcon. In theory when the
dirs are scanned the Excluded status of non Sharable the dirs ought to be put
into the cache and so we should not need
to make this call during annotation in the AWT thread. Will need further
investigation.
------- Comment #8 From 2008-02-08 17:02:54 -------
Created an attachment (id=56352) [details]
Patch not applying cleanly needs hand merged
------- Comment #9 From 2008-02-08 17:04:11 -------
Need to merge with latest changes for ContextActions, will sort it on Monday.
------- Comment #10 From 2008-02-08 19:23:41 -------
changeset:   66585:74faae7d4504
tag:         tip
user:        jrice@netbeans.org
date:        Fri Feb 08 19:16:07 2008 +0000
files:       mercurial/src/org/netbeans/modules/mercurial/FileStatusCache.java
mercurial/src/org/netbeans/modules/mercurial/MercurialAnnotator.java
mercurial/src/org/netbeans/modules/mercurial/ui/ignore/Bundle.properties
mercurial/src/org/netbeans/modules/mercurial/ui/ignore/IgnoreAction.java
mercurial/src/org/netbeans/modules/mercurial/ui/log/DiffTreeTable.java
mercurial/src/org/netbeans/modules/mercurial/ui/log/HgLogMessage.java
mercurial/src/org/netbeans/modules/mercurial/ui/log/RevisionNode.java
mercurial/src/org/netbeans/modules/mercurial/ui/log/SummaryView.java
mercurial/src/org/netbeans/modules/mercurial/ui/pull/FetchAction.java
mercurial/src/org/netbeans/modules/mercurial/ui/pull/PullAction.java
mercurial/src/org/netbeans/modules/mercurial/ui/pull/PullOtherAction.java
mercurial/src/org/netbeans/modules/mercurial/ui/push/PushOtherAction.java
mercurial/src/org/netbeans/modules/mercurial/ui/status/StatusAction.java
mercurial/src/org/netbeans/modules/mercurial/ui/update/RevertModificationsAction.java
mercurial/src/org/netbeans/modules/mercurial/ui/update/UpdateAction.java
mercurial/src/org/netbeans/modules/mercurial/ui/view/ViewAction.java
mercurial/src/org/netbeans/modules/mercurial/util/HgUtils.java
description:
#126869: prevent Ignore Menu enabling blocking on AWT thread
------- Comment #11 From 2008-02-08 20:34:49 -------
changeset:   66586:a67a46c4e271
user:        jrice@netbeans.org
date:        Fri Feb 08 19:59:36 2008 +0000
files:      
mercurial/src/org/netbeans/modules/mercurial/ui/update/Bundle.properties
mercurial/src/org/netbeans/modules/mercurial/ui/update/RevertModificationsAction.java
mercurial/src/org/netbeans/modules/mercurial/ui/update/RevertModificationsPanel.java
description:
#126869: allow Revert modifications dialog to come up immediately, in large
repos was blocking on hasHistory mercurial call
changeset:   66587:8ac052f230c8
user:        jrice@netbeans.org
date:        Fri Feb 08 20:11:04 2008 +0000
files:      
mercurial/src/org/netbeans/modules/mercurial/ui/clone/CloneAction.java
description:
#126869: allow Clone <project> dialog to come up immediately, in large repos
was blocking on hasHistory mercurial call
changeset:   66611:f23d4f0282e3
------- Comment #12 From 2008-02-13 16:04:44 -------
Patch has been applied.