jfreechart
jfreechart copied to clipboard
Replace DefaultKeyedValues2D indexOf usage with HashMap
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.
Downloaded PR to local branch on 09-feb-2020, awaiting more testing before final merge into master