On Wed, 19 Jun 2024 10:21:52 GMT, Markus Mack <mm...@openjdk.org> wrote:
> This PR provides the test case given in the JBS issue, and a simple fix for > the index calculation when inserting data after previous data with duplicate > categories. > > Also, I've added a comment to `BarChart`s javadoc, clarifying the behavior > that was apparently assumed (but broken) previously. > > The index lookup is skipped for performance reasons if there are no > duplicates, corresponding to the previous implementation. > Further optimizations would be possible, but probably are not really helpful > without more extensive changes. The previous code already loops over all > categories to check if they are present, typically nested in a loop adding > many data items, thus already scaling quadratically when adding lots of > mostly unique data points. This pull request has now been integrated. Changeset: c0216ae9 Author: Markus Mack <mm...@openjdk.org> Committer: Andy Goryachev <ango...@openjdk.org> URL: https://git.openjdk.org/jfx/commit/c0216ae94862c860e238b251a5e51aa7c83b9a1d Stats: 125 lines in 2 files changed: 124 ins; 0 del; 1 mod 8088923: IOOBE when adding duplicate categories to the BarChart Reviewed-by: angorya, mstrauss ------------- PR: https://git.openjdk.org/jfx/pull/1476