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: | Replace EditorCookie.getOpenedPanes() with something faster | ||
---|---|---|---|
Product: | utilities | Reporter: | misterm <misterm> |
Component: | Search | Assignee: | Jaroslav Havlin <jhavlin> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | NETFIX, PERFORMANCE |
Priority: | P3 | ||
Version: | 7.4 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 201909 |
Attachments: |
nps snapshot
screenshot profiler snapshot |
Description
misterm
2013-07-04 12:05:30 UTC
Created attachment 136713 [details]
nps snapshot
OpenFilesSearchScopeProvider.OpenFilesScope.isFromEditorWindow is asking for CloneableEditorSupport.getOpenedPanes which may be costly. Please check if there's an alternate API for that, thanks. I've tried replacing "editor.getOpenedPanes() != null" with "editor.getDocument() != null", but it's not guaranteed that it returns null for already closed documents. More investigation is needed. Created attachment 139506 [details] screenshot I also had such an issue that NB froze today. Product Version: NetBeans IDE Dev (Build 201308290001) Updates: Updates available Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b17 System: Windows 7 version 6.1 running on amd64; Cp1252; de_DE (nb) Right before I installed http://plugins.netbeans.org/plugin/45925/sort-line-tools. I sampled NB while it was frozen. See attachment (screenshot and snapshot). The root cause seems to be https://github.com/markiewb/nb-sort-line-tools/blob/master/src/org/netbeans/modules/linetools/actions/AbstractLineAction.java?source=cc#L80 Created attachment 139507 [details]
profiler snapshot
(In reply to markiewb from comment #4) > The root cause seems to be > https://github.com/markiewb/nb-sort-line-tools/blob/master/src/org/netbeans/ > modules/linetools/actions/AbstractLineAction.java?source=cc#L80 If this is really my fault (BTW I only repacked the plugin, sandchiptale was the original author) please tell me which API I can use to fix it. (In reply to markiewb from comment #6) > (In reply to markiewb from comment #4) > > The root cause seems to be > > https://github.com/markiewb/nb-sort-line-tools/blob/master/src/org/netbeans/ > > modules/linetools/actions/AbstractLineAction.java?source=cc#L80 > > If this is really my fault (BTW I only repacked the plugin, sandchiptale was > the original author) please tell me which API I can use to fix it. {code} JEditorPane pane = NbDocument.findRecentEditorPane(ec); {code} would be the solution I guess - taken from http://hg.netbeans.org/main-golden/rev/21e2a273a524 (In reply to markiewb from comment #7) > (In reply to markiewb from comment #6) > > (In reply to markiewb from comment #4) > > > The root cause seems to be > > > https://github.com/markiewb/nb-sort-line-tools/blob/master/src/org/netbeans/ > > > modules/linetools/actions/AbstractLineAction.java?source=cc#L80 > > > > If this is really my fault (BTW I only repacked the plugin, sandchiptale was > > the original author) please tell me which API I can use to fix it. > > {code} > JEditorPane pane = NbDocument.findRecentEditorPane(ec); > {code} > would be the solution I guess - taken from > http://hg.netbeans.org/main-golden/rev/21e2a273a524 FYI: If it was an issue caused by the plugin, so it is now solved by version 1.12. * https://github.com/markiewb/nb-sort-line-tools/commit/c92ddf60b18ad21b9654830719945344e8365e56 * http://plugins.netbeans.org/plugin/45925 (currently pending for verification) > JEditorPane pane = NbDocument.findRecentEditorPane(ec); Fixed in http://hg.netbeans.org/core-main/rev/cc60d35659aa. Thank you very much. |