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 199739

Summary: BinaryFS call to intern is slow.
Product: platform Reporter: Petr Hrebejk <phrebejk>
Component: FilesystemsAssignee: Jaroslav Tulach <jtulach>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 7.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Eliminating calls to intern.
Trying to do "intern()" when the file is being written, so it is ready when reading it

Description Petr Hrebejk 2011-06-27 15:30:34 UTC
Reading all files (~38K) and attributes (~150K) from BinaryFS is slow because of calls into String.intern() in initialize:437 method. (two calls).
Comment 1 Jaroslav Tulach 2011-07-21 14:23:07 UTC
Created attachment 109556 [details]
Eliminating calls to intern. 

Hřebejku can you find out if this is faster?
Comment 2 Jaroslav Tulach 2011-08-11 15:00:08 UTC
Created attachment 109932 [details]
Trying to do "intern()" when the file is being written, so it is ready when reading it

Hřebejku, please measure and if it is not faster, give me a profiler snapshot.
Comment 3 Petr Hrebejk 2011-08-24 16:32:14 UTC
Looks OK. The measurements show about 10% performance improvement when reading the filesystem.
Comment 4 Jaroslav Tulach 2011-08-25 08:32:44 UTC
OK, let's integrate.
Comment 5 Jaroslav Tulach 2011-08-25 08:57:21 UTC
ergonomics
Comment 6 Quality Engineering 2011-08-26 14:39:34 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/ac91c811bd21
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #199739: Precompute 'intern' on save, so we don't need to call it on load