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 44113 - [perf] Direct access to Java sources skiping filesystem layer
Summary: [perf] Direct access to Java sources skiping filesystem layer
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC All
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords: PERFORMANCE
: 43765 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-06-01 17:13 UTC by _ rkubacki
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Measurement (7.89 KB, text/plain)
2004-06-28 09:45 UTC, Pavel Flaska
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2004-06-01 17:13:03 UTC
There is possible performance gain if we change
some places where Filesystems API is used to
direct access to files. 

Jesse wrote:
I have also noticed (OptimizeIt) that the scan of
sources performed during startup is using the
Filesystems API. This seems really dumb to me; of
course creating all those FileObject's etc. is
going to produce a huge amount of overhead
relative to just scanning File's (and ZipFile's).
I guess it may be necessary if you want to hold on
to each folder so as to listen for changes (though
if you are really doing that, your runtime
performance and memory usage is going to be
atrocious anyway).

Also at least acc. to OI, when your scanned
projects are in a CVS mount, you are spending more
time refreshing CVS status annotations than
actually looking for changed sources!

Another place is code completion where following
chain is used: NbCompletionJavaDoc.getClassElement
-> ClassElementFinder -> ClassPath.findPath -> JarFS.

Of course we have to measure the imapct but
expectation is that it will at least reduce the
amount of garbage produced if we use it on
isolated places.
Comment 1 Martin Matula 2004-06-04 16:09:14 UTC
*** Issue 43765 has been marked as a duplicate of this issue. ***
Comment 2 Tomas Hurka 2004-06-22 08:41:58 UTC
Moved to new subcomponent java/javacore.
Comment 3 Tomas Hurka 2004-06-28 09:10:27 UTC
Implemented in trunk. Scanning now directly used java.io.* package. 

Removing ClassUpdater.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/ClassUpdater.java,v  <--  
ClassUpdater.java
new revision: delete; previous revision: 1.11
done
Checking in ExclusiveMutex.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/ExclusiveMutex.java,v  <--  
ExclusiveMutex.java
new revision: 1.10; previous revision: 1.9
done
Removing FileScanner.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/FileScanner.java,v  <--  
FileScanner.java
new revision: delete; previous revision: 1.7
done
Checking in JMManager.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/JMManager.java,v  <--  
JMManager.java
new revision: 1.21; previous revision: 1.20
done
Checking in JavaCoreModule.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/JavaCoreModule.java,v  <--  
JavaCoreModule.java
new revision: 1.5; previous revision: 1.4
done
Removing JavaUpdater.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/JavaUpdater.java,v  <--  
JavaUpdater.java
new revision: delete; previous revision: 1.10
done
Removing ResourceUpdater.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/ResourceUpdater.java,v  <--  
ResourceUpdater.java
new revision: delete; previous revision: 1.4
done
Processing log script arguments...
More commits to come...
Checking in jmiimpl/javamodel/ResourceImpl.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/
ResourceImpl.java,v  <--  ResourceImpl.java
new revision: 1.15; previous revision: 1.14
done
Comment 4 Pavel Flaska 2004-06-28 09:45:59 UTC
Created attachment 16029 [details]
Measurement
Comment 5 Antonin Nebuzelsky 2004-06-28 15:37:52 UTC
I measured the impact of this change. Looks very good, improves
significantly the initial scan.

1) Initial scan of JDK and project at jEdit project open:
before the change - 2:23 on W2K, 1:24 on Linux
after the change - 2:03 on W2K, 1:01 on Linux

2) Update after IDE restart
before the change - 9.2s on W2K, 4s on Linux
after the change - 9.1s on W2K, 4s on Linux
Comment 6 Quality Engineering 2007-09-20 12:50:41 UTC
Reorganization of java component