Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
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
Product: versioncontrol
Classification: Unclassified
Component: Mercurial
6.x
Sun All
: P2 (vote)
: TBD
Assigned To: issues@versioncontrol
issues@versioncontrol
: PERFORMANCE
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-06 21:51 UTC by _ pcw
Modified: 2008-02-13 16:04 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


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

Note You need to log in before you can comment on or make changes to this bug.
Description _ pcw 2008-02-06 21:51:58 UTC
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 _ pcw 2008-02-06 21:52:47 UTC
Created attachment 56198 [details]
thread stack dump
Comment 2 John Rice 2008-02-06 22:09:46 UTC
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 _ pcw 2008-02-06 22:47:59 UTC
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 _ pcw 2008-02-07 00:52:35 UTC
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 _ pcw 2008-02-07 00:53:04 UTC
Created attachment 56204 [details]
stack dump
Comment 6 John Rice 2008-02-07 09:50:07 UTC
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 John Rice 2008-02-08 15:56:16 UTC
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 John Rice 2008-02-08 17:02:54 UTC
Created attachment 56352 [details]
Patch not applying cleanly needs hand merged
Comment 9 John Rice 2008-02-08 17:04:11 UTC
Need to merge with latest changes for ContextActions, will sort it on Monday.
Comment 10 John Rice 2008-02-08 19:23:41 UTC
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 John Rice 2008-02-08 20:34:49 UTC
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 Padraig Obriain 2008-02-13 16:04:44 UTC
Patch has been applied.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo