jfreechart icon indicating copy to clipboard operation
jfreechart copied to clipboard

Replace DefaultKeyedValues2D indexOf usage with HashMap

Open sebkajeka opened this issue 8 years ago • 1 comments

Adding to DefaultKeyedValues2D was causing a massive slow down if the dataset was much wider (more columns) than it is tall (more rows). This was due to repeated use of List.indexOf to locate indexes for columns. Use of a HashMap to store indexes causes a large gain in performance when adding very large datasets to a DefaultCategoryDataset. The HashMaps don't require repeated lengthy look-ups per column or row as was happening; at the trade-off of more memory usage.

sebkajeka avatar Nov 17 '16 17:11 sebkajeka

Downloaded PR to local branch on 09-feb-2020, awaiting more testing before final merge into master

tracylynne99 avatar Feb 10 '20 03:02 tracylynne99