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 - Folding support use 4 BasePositions per Fold, which is too expensive
Summary: Folding support use 4 BasePositions per Fold, which is too expensive
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Code folding (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2007-04-10 16:29 UTC by Petr Nejedly
Modified: 2012-06-07 09:16 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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).