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 116352 - JavaElementFoldManager.FoldInfo has poor hashCode
Summary: JavaElementFoldManager.FoldInfo has poor hashCode
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks: 197743
  Show dependency tree
 
Reported: 2007-09-21 17:00 UTC by Petr Nejedly
Modified: 2011-04-18 16:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Nejedly 2007-09-21 17:00:44 UTC
Uncovered by MemoryLint. All FoldInfos for single file are in the same bucket.
If no better hashCode can be provided (quite likely case, as the FoldInfos use Positions), avoid using HashMap and
rather keep the data in a sorted collection/map.
The fix is probably not necessary for 6.0, though it may contribute to worse performance of editing large files.
Comment 1 Jan Lahoda 2008-01-31 10:23:06 UTC
I agree it is not nice, and actually this whole provider should be improved (ideally also the fold API should be
improved :-) ), and it is possible that this might contribute to worse performance. OTOH (and IIRC :-) ) it never showed
up on any measurement we did - making P4. If there is any measurement that shows that the folds contribute to lags,
etc., please adjust the priority accordingly. Thanks.
Comment 2 Jan Lahoda 2008-11-21 07:41:34 UTC
Later, unless it proves to be a problem visible for users.
Comment 3 Quality Engineering 2009-11-02 11:00:35 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX
Comment 4 Quality Engineering 2011-04-17 08:40:40 UTC
Integrated into 'main-golden', will be available in build *201104170401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/678e6f67c70e
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #116352: more efficient diffing&committing of (Java) folds.