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 100491

Summary: Folding support use 4 BasePositions per Fold, which is too expensive
Product: editor Reporter: Petr Nejedly <pnejedly>
Component: Code foldingAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: blocker CC: issues, mmetelka
Priority: P2 Keywords: PERFORMANCE
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Petr Nejedly 2007-04-10 16:29:01 UTC
BasePosition is quite expensive and (automatic) folds are pretty common in XML
documents, so any saving here would be nice.
Sample 1.3MB xsd document has 10.000 folds -> 40.000 BasePositions+infrastructure. 
Cutting number of BPs in half (by tracking guarded areas differently) would save
over 1MB of heap (1.5MB without fixing issue 100489)
Comment 1 Svata Dedic 2012-06-07 09:16:34 UTC
Positions are not that expensive, but instead of guarded areas, the fold could listen on document events to decide whether it will be damaged or not by the upcoming change (remove).