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 66489 - Speed up FilterClassPathImplementation.createResources()
Summary: Speed up FilterClassPathImplementation.createResources()
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: issues@java
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2005-10-11 14:19 UTC by _ rkubacki
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2005-10-11 14:19:37 UTC
build from Oct 10, JDK 1.5

I noticed that when creating a new J2SE project there are many conversions
between URLs and FileObjects called from
FilterClassPathImplementation.createResources(). I see 601 calls through this
call stack

                Called 601 times from:
Lorg/openide/filesystems/FileUtil;.normalizeFile
Lorg/netbeans/modules/masterfs/MasterURLMapper;.getFileObjects
Lorg/openide/filesystems/URLMapper;.findFileObject
Lorg/netbeans/modules/javacore/classpath/MergedClassPathImplementation;.getRoots
Lorg/netbeans/modules/javacore/JMManager;.mergedCPContainsRoot
Lorg/netbeans/modules/javacore/classpath/FilterClassPathImplementation;.createResources

also these calls are very likely related -

                Called 573 times from:
Lorg/openide/filesystems/FileUtil;.normalizeFile
Lorg/netbeans/modules/masterfs/MasterURLMapper;.getFileObjects
Lorg/openide/filesystems/URLMapper;.findFileObject
Lorg/netbeans/core/startup/layers/ArchiveURLMapper;.getFileObjects
Lorg/openide/filesystems/URLMapper;.findFileObject
Lorg/netbeans/modules/javacore/classpath/MergedClassPathImplementation;.getRoots

It seems to me that filtered CP knows about root URLs but converts them to
FileObject and merged CP performs oposite conversion because it keeps list of
URLs. If I got it correctly it might be possible to optimize this. Querying all
the mappers again and again together with normalization of files and accessing
I/O (File.isDirectory calls deeper in call chain) can be avoided then.
Comment 1 Jan Becicka 2006-10-26 16:26:24 UTC
Javacore module was replaced by Retouche infrastructure. This bug is not valid
in trunk any more.
Comment 2 Quality Engineering 2007-09-20 09:58:14 UTC
Reorganization of java component