Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 134902 - HgUtils.isIgnored is very slow
HgUtils.isIgnored is very slow
Product: versioncontrol
Classification: Unclassified
Component: Mercurial
All All
: P3 (vote)
: 6.x
Assigned To: issues@versioncontrol
: 132835 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2008-05-13 02:12 UTC by Jesse Glick
Modified: 2008-05-13 15:27 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT

proposed patch (1.91 KB, patch)
2008-05-13 14:04 UTC, Padraig Obriain
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2008-05-13 02:12:19 UTC
If you open any module project and expand its Source Packages or Unit Test Packages node in the Projects tab, the
IDE will freeze for a few seconds (blocking EQ) before they are displayed. Thread dumps reveal that the IDE is mostly
running HgUtils.isIgnored.

The block "we assume that the Project should not be ignored" not only has no basis in fact, but it seems to be
particularly slow. It should be deleted. The rest of the time seems to be spent running the pattern matcher.
Consolidating the regexps into a single one using '|' for alternation does not seem to help significantly.
Comment 1 Padraig Obriain 2008-05-13 14:01:25 UTC
I will remove the complained of block of code HgUtils.isIgnored.

A large number of the calls to HgUtils.isIgnored are caused by FileStatusCache.getCachedStatus called from

I believe that FileStatusCache.getCachedStatus should not be calling HgUtils.isIgnored. I have removed this call which
seems to have speeded things up.
Comment 2 Padraig Obriain 2008-05-13 14:04:46 UTC
Created attachment 61332 [details]
proposed patch
Comment 3 Padraig Obriain 2008-05-13 14:06:58 UTC
*** Issue 132835 has been marked as a duplicate of this issue. ***
Comment 4 Padraig Obriain 2008-05-13 15:27:06 UTC
changeset:   79979:8d84c2420554
tag:         tip
date:        Tue May 13 14:02:46 2008 +0100
summary:     134902: Remove redundant code from HgUtils.isIgnored; Do not call HgUtils.isIgnored in

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