RFR: 8185886: Improve scrolling performance of TableView and TreeTableView [v4]

Kevin Rushforth kcr at openjdk.java.net
Tue Sep 8 20:21:51 UTC 2020

On Thu, 3 Sep 2020 07:44:55 GMT, yosbits <github.com+7517141+yososs at openjdk.org> wrote:

>>> When the startup time is measured by eye, the impression changes depending on the individual difference.
>> my eye is a precision instrument :) Seriously, who would do such a thingy? Obviously, it must be measured, for zeroth
>> approximation doing so crudely by comparing currentMillis before/after showing is good enough to "see" the tendency.
>>> The effect of runLater affects your experience.
>> that's why you shouldn't do it when trying to gain insight into timing issues ;)
>>> However, I succeeded in further improving performance by eliminating another bottleneck in TreeTableView. Of course, it
>>> also includes improvements in startup time.
>> cool :)
> Column virtualization causes shortness of breath when scrolling a large stroke horizontally.
> This does not happen when stroking on the scrollbar. Looks like a potential problem with VirtualFlow.
> If you are worried about shortness of breath, the following code will help reduce the problem.
>  Java
>  private static final int OVERLAP_MARGIN = 500;
>     private static boolean isOverlap(double start, double end, double start2, double end2){
>     	start = Math.max(start-OVERLAP_MARGIN, start2);
>     	end = Math.min(end+OVERLAP_MARGIN, end2);
>         return (start<=end2 && end >= start2);
>     }

@yososs Per [this message](https://mail.openjdk.java.net/pipermail/openjfx-dev/2020-September/027534.html) on the
openjfx-dev mailing list, I have closed [JDK-8185886](https://bugs.openjdk.java.net/browse/JDK-8185886) as a duplicate,
and suggested another existing JBS issue for this PR to use. Please change the title to:

8185887: TableRowSkinBase fails to correctly virtualize cells in horizontal direction


PR: https://git.openjdk.java.net/jfx/pull/125

More information about the openjfx-dev mailing list