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.
Summary: | Switching between elements too often cause netbeans freeze for a while and cpu,memory usage surge. | ||
---|---|---|---|
Product: | cnd | Reporter: | hooluupog |
Component: | Navigation | Assignee: | Vladimir Voskresensky <vv159170> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | gorrus, mmirilovic, sindisil |
Priority: | P2 | ||
Version: | 7.3 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
hooluupog
2013-03-09 05:23:00 UTC
*** This bug has been marked as a duplicate of bug 225449 *** getLookup() method should always return the same instance, not create new one on every invocation. # This patch file was generated by NetBeans IDE # It uses platform neutral UTF-8 encoding and \n newlines. --- <html>NavigatorComponent.java (<b>Jan 23, 2013 7:05:07 PM</b>)</html> +++ <html><b>Current File</b></html> @@ -147,6 +147,13 @@ } } + class N extends ProxyLookup { + void update(Lookup... arr) { + setLookups(arr); + } + } + N n = new N(); + @Override public Lookup getLookup() { synchronized(lock) { @@ -154,10 +161,11 @@ return getPanelUI().getLookup(); } else { if (getPanelUI().getLookup().lookup(Node.class) == null) { - return new ProxyLookup(getPanelUI().getLookup(), Lookups.fixed(curData.getNodeDelegate(), curData, curData.getPrimaryFile())); + n.update(getPanelUI().getLookup(), Lookups.fixed(curData.getNodeDelegate(), curData, curData.getPrimaryFile())); } else { - return new ProxyLookup(getPanelUI().getLookup(), Lookups.fixed(curData, curData.getPrimaryFile())); + n.update(getPanelUI().getLookup(), Lookups.fixed(curData, curData.getPrimaryFile())); } + return n; } } } Thanks, Jarda: http://hg.netbeans.org/cnd-main/rev/15c8e2da0550 Integrated into 'main-golden', will be available in build *201303282300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/15c8e2da0550 User: Vladimir Voskresensky <vv159170@netbeans.org> Log: fixed (by Jarda) #227227 Switching between elements too often cause netbeans freeze for a while and cpu,memory usage surge. - use one lookup instance verified Verified in NetBeans 7.3 patch 2 *** Bug 226807 has been marked as a duplicate of this bug. *** |