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.
Performance whitelist test reports that the following classes are being loaded on NetBeans startup: org.netbeans.modules.web.client.javascript.debugger.attach.URLAttachPanel org.netbeans.modules.web.client.javascript.debugger.attach.URLAttachType This is considered as NetBeans performance regression. Please remove these classes from NetBeans startup. This issue is based on jtulach's comment: Please report a bug to debugger and make them justify this. My guess is that this is not needed, the org.netbeans.modules.debugger.ui.actions.ConnectAction.isEnabled() could always return true. Maybe they can use Actions.alwaysEnabled as well...
Created attachment 64747 [details] Stacktraces
I have simply registered the org.netbeans.modules.web.client.javascript.debugger.attach.URLAttachType in: web.client.tools.impl/src/META-INF/debugger/org.netbeans.spi.debugger.ui.AttachType which return org.netbeans.modules.web.client.javascript.debugger.attach.URLAttachPanel from one of it's methods. What can I do to fix this problem?
I am using the standard mechanism of registering org.netbeans.spi.debugger.ui.AttachType impls.
I see analogous in the whitelist: org.netbeans.modules.cnd.debugger.gdb.attach.GdbAttachPanel org.netbeans.modules.cnd.debugger.gdb.attach.GdbAttachType org.netbeans.modules.bpel.debugger.ui.BpelAttachType org.netbeans.modules.bpel.debugger.ui.BpelConnectPanel org.netbeans.modules.debugger.jpda.ui.JPDAAttachType in the whitelist at ide.kit/test/qa-functional/data/whitelist.txt Am I supposed to add my classes to this file manually?
Adding yarda. Can someone answer this or point to any page if exists?
Maybe this is a bug in org.netbeans.modules.debugger.ui.actions.ConnectAction.isEnabled(ConnectAction.java:97) which instantiates all the classes in its isEnabled method. Samaresh, feel free to negotiate with Martin Entlicher who will fix the system to not load your class.
ConnectAction.isEnabled() need to check whether there are some implementations of AttachType registered in the system or not. It's true that it does not need to create the instances to find this out, but we do not have a better way of doing that with the current APIs. We'd need to add something like: int DebuggerManager.lookupCount(String folder, Class<T> service) which would return the count of services without creating instances. But this is not a regression, this behavior is there for ages already. If you think this is really a problem and that it justifies a new API, please reassign to debuggercore module.
Thanks Martin. Assigned to debuggercore.
I know this is not regression in debugger. However it is regression in 'big IDE' caused by a scalability problem in debugger. Easy fix, yet not perfect one, is to use lookupFirst, as you need at least one service to enable the action. Better fix, even without changing the API, is to create the List<?> from lookup([1]) without actually instantiating the classes, just by reading the registrations. That will give you chance to compute lookup(...).size() without instantiating anything. [1] http://bits.netbeans.org/dev/javadoc/org-netbeans-api-debugger/org/netbeans/api/debugger/DebuggerManager.html#lookup(java.lang.String, java.lang.Class)
List with lazy content instantiation is possible, of course. We already have a special list implementation, thus it needs to be merged into it's logic... I agree that this is an elegant way how to fix this.
LazyArrayList class added, which seems to fixed the problem. changeset: 101932:cff59ab75a95, 101934:2d3ae264b162 http://hg.netbeans.org/main/rev/cff59ab75a95 http://hg.netbeans.org/main/rev/2d3ae264b162
Integrated into 'main-golden', will be available in build *200809131401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/cff59ab75a95 User: mentlicher@netbeans.org Log: #140394 - LazyArrayList introduced and used by LookupList so that instanced defined from META-INF are created lazily when they are really needed.
Verified with 080915