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.
On of early optmizations that we did during 3.3 release were related to DataLoaders. Uprgade guide contained following text: >>> DataLoaders needs to be loaded into the IDE and initialized during the startup. They are necessary for the IDE functionality and may be considered entry point for file-type oriented modules. But there are things tightly coupled with DataLoaders which are not necessary until the DataLoader spot its file.<br> The first thing is <code>DataObject</code> for given DataLoader. Resolving DataObject too early can bring a lot of unneeded stuff into the IDE, but it was a common use-case of the DataLoader because the DataLoader have to pass its DataObject Class to the super constructor. As of OpenAPIs 1.10, it is possible to pass DataObject Class's name instead of the DataObject itself, so you should change your DataLoader constructor from <<< That's why http://www.netbeans.org/download/dev/javadoc/org-openide-loaders/org/openide/loaders/DataLoader.html#DataLoader(java.lang.Class) is deprecated and http://www.netbeans.org/download/dev/javadoc/org-openide-loaders/org/openide/loaders/DataLoader.html#DataLoader(java.lang.String) is prefered. I see that the constructor with Class parameter is used in CND module(s).
While optimizing loaders it can be usefull to evaluate the need for cached MIME type. There is already similar cache for this purpose in o.o.filesystems.MIMESupport that addresses the problem that MIME resolving can be expensive operation.
My last comments is about ExeLoader.
Are you referring to the file object attribute we store (in ExeLoader.findPrimaryFile())?
Yes, I am. Also now I see that what you store is not exactly MIME type returned by some MIME resolver. Is there some reason for this distiction? The MIME resolver itself can be declarative too IMO.
> Is there some reason for this distiction? Yes, but its probably obsolete. When netbeans first implemented the declarative mime resolver it didn't cache anything. Since its very expensive to resolve Elf exe files (you have to read the first 32 bytes), we used the FO attribute as a means of limiting this read. Now that NB caches mime type for each FO, it wouldn't seem to be necessary. We also do it for Makefiles.
I fixed the 1st part of this and the 2nd is from code I wrote 6 years ago, so I'll take that part, too.
Checking in cnd/core/src/org/netbeans/modules/cnd/loaders/AsmDataLoader.java; /shared/data/ccvs/repository/cnd/core/src/org/netbeans/modules/cnd/loaders/AsmDataLoader.java,v <-- AsmDataLoader.java new revision: 1.7; previous revision: 1.6 done Checking in cnd/core/src/org/netbeans/modules/cnd/loaders/CCDataLoader.java; /shared/data/ccvs/repository/cnd/core/src/org/netbeans/modules/cnd/loaders/CCDataLoader.java,v <-- CCDataLoader.java new revision: 1.7; previous revision: 1.6 done Checking in cnd/core/src/org/netbeans/modules/cnd/loaders/CDataLoader.java; /shared/data/ccvs/repository/cnd/core/src/org/netbeans/modules/cnd/loaders/CDataLoader.java,v <-- CDataLoader.java new revision: 1.7; previous revision: 1.6 done Checking in cnd/core/src/org/netbeans/modules/cnd/loaders/CndAbstractDataLoader.java; /shared/data/ccvs/repository/cnd/core/src/org/netbeans/modules/cnd/loaders/CndAbstractDataLoader.java,v <-- CndAbstractDataLoader.java new revision: 1.5; previous revision: 1.4 done Checking in cnd/core/src/org/netbeans/modules/cnd/loaders/FortranDataLoader.java; /shared/data/ccvs/repository/cnd/core/src/org/netbeans/modules/cnd/loaders/FortranDataLoader.java,v <-- FortranDataLoader.java new revision: 1.7; previous revision: 1.6 done Checking in cnd/core/src/org/netbeans/modules/cnd/loaders/HDataLoader.java; /shared/data/ccvs/repository/cnd/core/src/org/netbeans/modules/cnd/loaders/HDataLoader.java,v <-- HDataLoader.java new revision: 1.9; previous revision: 1.8 done Checking in cnd/core/src/org/netbeans/modules/cnd/loaders/MakefileDataLoader.java; /shared/data/ccvs/repository/cnd/core/src/org/netbeans/modules/cnd/loaders/MakefileDataLoader.java,v <-- MakefileDataLoader.java new revision: 1.8; previous revision: 1.7 done Checking in cnd/core/src/org/netbeans/modules/cnd/loaders/ShellDataLoader.java; /shared/data/ccvs/repository/cnd/core/src/org/netbeans/modules/cnd/loaders/ShellDataLoader.java,v <-- ShellDataLoader.java new revision: 1.8; previous revision: 1.7 done
Verified in build 31102007
Not verified. It was a mistake
State was changed due to mistake. Setting back the status
OK, but I can really verify this as fixed...