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 205574

Summary: The JSFBinaryIndexer predicates are very expensive
Product: editor Reporter: Tomas Zezula <tzezula>
Component: Parsing & IndexingAssignee: Tomas Zezula <tzezula>
Status: RESOLVED FIXED    
Severity: normal CC: epdv, pjiricka
Priority: P2 Keywords: PERFORMANCE
Version: 7.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 205575    
Bug Blocks:    

Description Tomas Zezula 2011-11-26 10:57:58 UTC
The JSFBinaryIndexer which uses ConstrainedBinaryIndexer registers very expensive predicates. It registers no required resource with combination with expensive mime type (the XML mime recognizer needs to read the content of file). What the JSFBinaryIndexer needs is to test that resource.getNameExt().endsWith(".taglib.xml").
Comment 1 Tomas Zezula 2011-11-26 11:00:03 UTC
The possible solution is to extend the ConstrainedBinaryIndexer.Registration by file name pattern predicate.
Comment 2 Tomas Zezula 2011-11-26 13:07:10 UTC
The problem cannot be reproduced in J2SE IDE even the JFXBinaryIndexer is a part of it.
The slow mime recognition "feature" is activated with J2EE cluster.
With J2SE cluster only the times for name pattern and mime type are the same.
With J2EE cluster the name pattern is significantly faster.

Mime type recognition:
Complete indexing of 51 binary roots took: 8113 ms
Complete indexing of 51 binary roots took: 7816 ms
Complete indexing of 51 binary roots took: 7818 ms

Rewritten to name pattern recognition:
Complete indexing of 51 binary roots took: 698 ms
Complete indexing of 51 binary roots took: 1105 ms
Complete indexing of 51 binary roots took: 1193 ms
Comment 3 Tomas Zezula 2011-11-29 16:26:23 UTC
Fixed jet-main 955842fb95d4
Comment 4 Tomas Zezula 2011-11-29 16:28:58 UTC
Fixed jet-main 955842fb95d4
Comment 5 Tomas Zezula 2011-11-29 16:40:33 UTC
Not approved to NB 7.1 by QA, scheduled for patch release.