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.
UpdateTrackingFileOwnerQuery(FileObject fo) always converts FO to java.io.File. This is conversion is not trivial because it iterates URL mappers to find URL with file: protocol gets its path and normalizes it. The FOQ is now very important for many places of IDE like action enabling and thus it is called even during typing in editor. Shouldn't it be based on filesystems lib like other parts of IDE to aviod these conversions?
I don't know how to fix it in apisupport. It is unacceptable for ModuleList to keep FileObject keys as it could leak memory. IMHO is would be much better to fix FileUtil.toFile to use some sort of cache (which would also benefit all callers, not just apisupport).
I agree that caching might improve it a bit - issue #66361 OTOH we should be able to improve current state for users that develop just regular J2SE/J2EE projects and do not have any NB module on their disk at least. I mean as long as the ModuleList.knownEntries is empty the query can return null and no conversion is needed.
Will implement the suggested optimization.
committed * Up-To-Date 1.3 apisupport/project/src/org/netbeans/modules/apisupport/project/queries/UpdateTrackingFileOwnerQuery.java committed * Up-To-Date 1.20 apisupport/project/src/org/netbeans/modules/apisupport/project/universe/ModuleList.java
Radim, can you verify this bug?