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 158334

Summary: Too many calls of MultiFileObject.getAttribute(fo, string, string)
Product: platform Reporter: Pavel Flaska <pflaska>
Component: FilesystemsAssignee: Jaroslav Tulach <jtulach>
Status: RESOLVED FIXED    
Severity: blocker CC: jglick, jtulach
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 157829    
Attachments: Debugging patches and a fix

Description Pavel Flaska 2009-02-10 18:00:10 UTC
During lookup initialization profiling, we have found that there is a too many calls to $SUBJ. It seems to be caused by
changeset:   113509:61f814414c7d

summary: Calling getAttribute from methodvalue on different fileobject could result in bad behaviour
Comment 1 Jaroslav Tulach 2009-03-24 15:52:20 UTC
In my recent measurements there is about ~3500 queries for some attribute on SFS during startup and this results in 
~90000 of queries on some LocalFileSystem! I am not really sure about the numbers, but if we got this back to 1:1 
ratio we might get about 500ms from 7.7s start time - e.g. slightly more than 5%.
Comment 2 Jaroslav Tulach 2009-03-24 15:54:09 UTC
Created attachment 78761 [details]
Debugging patches and a fix
Comment 3 Jaroslav Tulach 2009-03-24 15:57:13 UTC
The problem is that one of the SFS's MultiFileSystems has as many ExLocalFileSystem children as we have clusters 
(about 20). These ExLFSs are all read only, yet the MFS.getAttribute inspects them for overriden values of all 
attributes. My patch disables this behaviour, bringing the number of real queries (~3500) and final touches on ExLFS 
(~3500) to 1:1 relation (because there is one writable ExLFS, the userdir).
Comment 4 Jesse Glick 2009-03-24 16:09:02 UTC
The patch leaves in the somewhat mysterious comment

"Could skip all RO FSs but then multi-user installs would not work quite right."

which should be explained/addressed, and if you are changing this behavior, delete the comment.
Comment 5 Jiri Skrivanek 2009-04-10 12:03:59 UTC
Consequnces of the patch are unclear.
Comment 6 Jaroslav Tulach 2010-04-12 15:55:33 UTC
Applying slightly different fix: core-main#c8e0e5e50336
Comment 7 Quality Engineering 2010-04-13 17:36:50 UTC
Integrated into 'main-golden', will be available in build *201004131450* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/c8e0e5e50336
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #158334: As most of the queries are about root attributes of read only systems, let's eliminate them by keeping the list of all existing root attributes (close to zero usually).