On Fri, 11 Sep 2026 14:30:49 GMT, Michael Strauß <[email protected]> wrote:

>> Very good question, thought about it as well, but we usually only remove one 
>> or at a maximum two cells. So I think it is not worth it.
>> 
>> Tested with the reproducer in the ticket. Using a:
>> - `fixedCellSize`, we usually just remove one cell sometimes
>> - Without `fixedCellSize`, we also remove one cell, very rarely two
>> - With cells that may have a very different height, we usually still only 
>> remove 1-2 cells here
>> - When resizing a `ListView` (-> bigger) to have more cells, then resizing 
>> it down again will also remove 1-2 cells 
>> 
>> The only test case where I could get many cell removals at a time is by 
>> changing the `Window` to maximized, then again to the normal size (so both 
>> with one click, not resizing the `Window` manually). In this case I got ~15 
>> cells removed at a time.
>> 
>> Rethinking now, I'm not 100% sure. What do you think?
>
> I'm always suspicious of modifying anything that's observable in a live loop. 
> In my conservative estimation, JavaFX has about 5 million bugs because of 
> that. So even though in this case, we might only remove very few elements, 
> I'd still do a bulk notification at the end.

Done. `ListChangeListener` really is hard to get right and there are lot of 
wrong implementations of it. Agreed.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/2308#discussion_r3990539247

Reply via email to