Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 125220 - Freeze while opening popup on project node
Freeze while opening popup on project node
Status: VERIFIED FIXED
Product: versioncontrol
Classification: Unclassified
Component: Mercurial
6.x
PC Windows XP
: P3 (vote)
: 6.x
Assigned To: issues@versioncontrol
issues@versioncontrol
:
: 126843 126877 126978 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-14 14:48 UTC by Jiri Skrivanek
Modified: 2008-02-08 23:12 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
Thread dump. (16.81 KB, text/plain)
2008-01-14 14:49 UTC, Jiri Skrivanek
Details
Proposed patch (19.62 KB, text/plain)
2008-01-17 13:04 UTC, John Rice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2008-01-14 14:48:54 UTC
IDE is freezed for a while when you try to open popup menu on versioned project node. It is similar like issue 121354. I
think all Hg commands should be moved out of the event thread. To reproduce:

- hg clone http://hg.netbeans.org/main
- open main/openide.util
- right click on 'Utilities API [main]' node in the Projects view and IDE freezes for a while (see thread dump).

Mercurial Plugin: built from trunk on 2008-01-14
Mercurial Runtime: 0.9.5
Product Version: NetBeans IDE Dev (Build 20080114044012)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)
Userdir: D:\Development\builds\nbUserdir-Hg
Comment 1 Jiri Skrivanek 2008-01-14 14:49:20 UTC
Created attachment 55037 [details]
Thread dump.
Comment 2 John Rice 2008-01-16 16:18:05 UTC
Had a quick look at this using the profiler:

HgUtils.readIgnoreEntries: 58ms
MercurialAnnotator.getActions: 44ms
HgUtils.addIgnorePatterns: 41ms

The main/.hgignore has 763 entries.

getActions() calls isNothingVersioned() calls getStatus() calls isIgnored()
annotateName() calls getCachedStatus() calls isIgnored()

Will need to look into optimizing this if possible
Comment 3 John Rice 2008-01-17 13:04:51 UTC
Created attachment 55196 [details]
Proposed patch
Comment 4 John Rice 2008-01-17 13:12:59 UTC
Changing the logic in the menu enabling code, so for Clone, ExportDiff, ImportDiff, Log (Show History), Rollback and
RevertModifications we used to call hasHistory in isEnabled(). We no longer do this but check that its under Hg control,
then when they perform the action, if it has no history we inform the user and return.
This removes all Hg related calls from menu display and speeds things up a lot. 

Also fixed a few inconsistencies when some top level menu items, namely Pull & Push to default where enabled for non Hg
projects, that should not have been.


IDE:-------------------------------------------------
IDE: [17/01/08 13:12] Committing Files started
Checking in ui/diff/ExportDiffAction.java;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/diff/ExportDiffAction.java,v
 <--  ExportDiffAction.java
new revision: 1.10; previous revision: 1.9
done
Checking in ui/diff/Bundle.properties;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/diff/Bundle.properties,v 
<--  Bundle.properties
new revision: 1.9; previous revision: 1.8
done
Checking in ui/diff/ImportDiffAction.java;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/diff/ImportDiffAction.java,v
 <--  ImportDiffAction.java
new revision: 1.11; previous revision: 1.10
done
Checking in ui/update/Bundle.properties;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/update/Bundle.properties,v 
<--  Bundle.properties
new revision: 1.6; previous revision: 1.5
done
Checking in ui/update/RevertModificationsAction.java;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/update/RevertModificationsAction.java,v
 <--  RevertModificationsAction.java
new revision: 1.10; previous revision: 1.9
done
Checking in ui/pull/Bundle.properties;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/pull/Bundle.properties,v 
<--  Bundle.properties
new revision: 1.14; previous revision: 1.13
done
Checking in ui/pull/PullAction.java;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/pull/PullAction.java,v  <--
 PullAction.java
new revision: 1.21; previous revision: 1.20
done
Checking in ui/clone/CloneAction.java;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/CloneAction.java,v 
<--  CloneAction.java
new revision: 1.18; previous revision: 1.17
done
Checking in ui/clone/Bundle.properties;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/Bundle.properties,v 
<--  Bundle.properties
new revision: 1.16; previous revision: 1.15
done
Checking in MercurialAnnotator.java;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/MercurialAnnotator.java,v  <--
 MercurialAnnotator.java
new revision: 1.21; previous revision: 1.20
done
Checking in ui/push/Bundle.properties;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/push/Bundle.properties,v 
<--  Bundle.properties
new revision: 1.14; previous revision: 1.13
done
Checking in ui/push/PushAction.java;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/push/PushAction.java,v  <--
 PushAction.java
new revision: 1.22; previous revision: 1.21
done
Checking in ui/log/LogAction.java;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/log/LogAction.java,v  <-- 
LogAction.java
new revision: 1.11; previous revision: 1.10
done
Checking in ui/log/Bundle.properties;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/log/Bundle.properties,v  <--
 Bundle.properties
new revision: 1.6; previous revision: 1.5
done
Checking in ui/rollback/RollbackAction.java;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/rollback/RollbackAction.java,v
 <--  RollbackAction.java
new revision: 1.12; previous revision: 1.11
done
Checking in ui/merge/MergeAction.java;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/merge/MergeAction.java,v 
<--  MergeAction.java
new revision: 1.13; previous revision: 1.12
done
IDE: [17/01/08 13:12] Committing Files finished
Comment 5 Jiri Skrivanek 2008-01-18 07:42:56 UTC
Verified.
Comment 6 Padraig Obriain 2008-02-06 15:49:22 UTC
*** Issue 126843 has been marked as a duplicate of this issue. ***
Comment 7 John Rice 2008-02-06 22:09:39 UTC
*** Issue 126869 has been marked as a duplicate of this issue. ***
Comment 8 John Rice 2008-02-08 23:08:28 UTC
*** Issue 126978 has been marked as a duplicate of this issue. ***
Comment 9 John Rice 2008-02-08 23:12:01 UTC
*** Issue 126877 has been marked as a duplicate of this issue. ***


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