RFR: Fix VirtualFlow performance regression in ListView scrolling
Huang Xiao
duke at openjdk.org
Tue Jan 13 01:33:59 UTC 2026
On Mon, 12 Jan 2026 16:23:11 GMT, Marius Hanl <mhanl at openjdk.org> wrote:
>>> > @Maran23 Hello, I noticed you've made contributions to this area before. Could you help me review this issue?
>>> > A relatively complete code example has been provided above. If you need a directly usable attachment, I can provide it.
>>>
>>> Hi @youngledo , thanks for reporting this. To follow the normal procedure, can you please file a bug in https://bugs.java.com/bugreport/ ? When doing that, there is (after manual triage) machinery going on behind the scenes that facilitates the whole flow between bug report, discussions, PR, release docs etc.
>>>
>>> I believe there is a fair chance indeed that the code you mention can lead to regression in a number of situations. Your code sample would be helpful, but is best provided after you report the bug. I notice there are @FXML refs but I don't see an FXML file, so I suggest you upload a zip file (once the issue is in JBS).
>>
>>
>> @johanvos
>> Sorry, I forgot to mention that since I'm just a regular user, I couldn't figure out how to become a member. Could you help me submit the issue, or what should I do instead?
>>
>> The sample project has been uploaded:
>> [demo-javafx.zip](https://github.com/user-attachments/files/24561207/demo-javafx.zip)
>
>> I forgot to mention that since I'm just a regular user, I couldn't figure out how to become a member
>
> You are an `Author`, so you should be able to login to https://bugs.openjdk.org/issues/?filter=39543.
> See also the message from `@bridgekeeper`
>> Welcome back youngledo
>
> Without checking your example, simply removing both lines of code is certainly not the right fix. This was implemented to fix problems, so I'm pretty sure this will lead to regressions.
>
> Also note that you should check if applying https://github.com/openjdk/jfx/pull/1945 fixes your problem, as this is an issue that could lead to many unnecessary relayouts right now.
>
> Note that I believe that the performance of the `VirtualFlow` can be improved a lot, but I'm not sure this is the right approach / the right place.
> Example: the `removeAll` should not be triggered that often and the pile should not be that big. If it is, we may need to check out why this is first.
@Maran23 Thank you for your reply. I am not an author yet; I am still in the application process.
Yes, you're right that deleting the code isn't appropriate, but I tried using the published version 24 locally and it worked fine.
Moreover, the sample code provided above is very simple, and it shouldn't be this laggy even when generating only a few entries.
I forgot to mention, my system environment is:
- Apple M1
- macOS 26.2
-------------
PR Comment: https://git.openjdk.org/jfx/pull/2030#issuecomment-3741362221
More information about the openjfx-dev
mailing list