RFR: 8185886: Improve scrolling performance of TableView and TreeTableView
kcr at openjdk.java.net
Tue Feb 25 00:47:19 UTC 2020
On Sat, 22 Feb 2020 08:42:52 GMT, yosbits <github.com+7517141+yososs at openjdk.org> wrote:
>> @kevinrushforth just a note to say there are other ExpressionHelper classes (i.e. MapExpressionHelper, SetExpressionHelper and ListExpressionHelper) that also use arrays and suffer from the linear search issue when removing listeners.
>> These however didn't appear in the critical path of the JavaFXThread and didn't come up in my profiling of TableView.
>> If this pull request is accepted, my opinion is that they should probably all move to using the same pattern as here, which is to use Maps instead of Arrays for their listener lists so that all these classes are uniform.
> Sorry for the interruption, send a PR that corrects the same problem.
I haven't done a detailed review yet, but I worry about the memory consumption and performance of using a Map for the simple cases where there is only a single (or very small number) of listeners. These methods are used in many more places than just the TableView / TreeTableView implementation.
More information about the openjfx-dev