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.

Bug 193287 - org.netbeans.modules.editor.impl.ActionsList.<init>() calls DataObject.find() and takes too long
Summary: org.netbeans.modules.editor.impl.ActionsList.<init>() calls DataObject.find()...
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Settings (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: David Strupl
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2010-12-12 09:51 UTC by tnleeuw
Modified: 2013-02-12 08:29 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 155530


Attachments
nps snapshot (17.81 KB, application/nps)
2010-12-12 09:51 UTC, tnleeuw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tnleeuw 2010-12-12 09:51:19 UTC
Build: NetBeans IDE Dev (Build 201012100001)
VM: Java HotSpot(TM) Server VM, 17.1-b03, Java(TM) SE Runtime Environment, 1.6.0_22-b04
OS: Windows Vista

User Comments:
GUEST: Ctrl-I search.

tnleeuw: Setting a debugger-breakpoint, while debugging



Maximum slowness yet reported was 7823 ms, average is 5580
Comment 1 tnleeuw 2010-12-12 09:51:23 UTC
Created attachment 103979 [details]
nps snapshot
Comment 2 David Strupl 2010-12-21 13:41:03 UTC
As you can see from reports 452749 and 455173 the culprit is DataObject.find(). The question is whether it should be called from AWT EDT but when using default lookup (or other lookups which use sfs) this is not avoidable.
Comment 3 Jaroslav Tulach 2010-12-21 16:54:56 UTC
Look at 
org.netbeans.modules.editor.impl.ActionsList.<init>()
I don't see much reasons why constructor shall initialize something from disk. Just return the instance and that is it.
Comment 4 David Strupl 2011-05-31 09:17:19 UTC
If DataObject.find is ok to take 9 seconds I don't think there is anything we can do in the editor to avoid this delay. The problem is obviously not in the constructor. There are other calls of ActionsList.convert or subsequently ActionList.convertImpl which are done in AWT. E.g. when you invoke popup we need to convert the actions to show them. Closing as wontfix. If someone sends a reasonable patch we can apply it.
Comment 5 Peter Nabbefeld 2013-02-12 08:29:56 UTC
I've got a slowness report today (#657471), and after looking at it, I noticed one time-consuming issue is handling of FileObjects in org.netbeans.modules.maven.execute.DefaultReplaceTokenProvider.extractFileObjectsfromLookup():
As it seems to scan whole SFS, it's very time-consuming, and it seems to be used several times, i.e. for every files or usage search, so IMHO the resulting FileObject array should probably be cached. I don't expect problems with memory usually, as scanning seems to happen often, so memory will be occupied nevertheless, with probable side effects like memory leaks or making GC busy (resulting in even more time consumption).