RFR: 8370498: Improve how Node detects whether a layout property change requires a new layout pass [v4]
John Hendrikx
jhendrikx at openjdk.org
Wed Jan 7 21:25:32 UTC 2026
On Mon, 27 Oct 2025 14:44:44 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:
>> This new check is much more accurate to detect whether a parent is currently laying out its children. The previous code almost never worked, resulting in additional unnecessary layouts.
>
> John Hendrikx has updated the pull request incrementally with one additional commit since the last revision:
>
> Rename test
> To add to an earlier discussion regarding the number of iterations required for the layout to converge: there are situations where the layout goes into infinite update mode - I've seen these back in java 8 fx days, and it might happen even today.
>
> Below is an example I captured with the monkey tester on 2025/12/03 using the current the master branch of that day:
>
> video1256508024.mp4
> The video could not capture the flicker exactly probably due to capture limitations, but the flicker continued until the user clicks on something or resizes the window.
It's nothing that can be resolved directly by some outside intervention, it just a bug in (what looks like) `ListView`. Only debugging what is triggering a new layout pass each time will help find the cause. These kind of bugs are unavoidable when controls or skins are not producing stable results from their layout calculations. Often calculations eventually converge, but that's really only the best case scenario, and certainly not the only possible outcome. You seem to have found a case where the calculations are not converging.
This is why IMHO any layout that relies on convergence is already broken; it just happens to broken in a way that eventually leads to a stable result...
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1945#issuecomment-3720863015
More information about the openjfx-dev
mailing list