RFR: 8370498: Improve how Node detects whether a layout property change requires a new layout pass [v4]
Johan Vos
jvos at openjdk.org
Tue Oct 28 17:12:06 UTC 2025
On Tue, 28 Oct 2025 16:51:35 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:
> How many pulses are needed to finish the layout? If we ignore for a second some pathological cases when the layout process never ends causing continuous flicker, is there a safe upper limit?
Realistically, I'd say 10 iterations is pretty common, and I wouldn't be surprised if it goes much higher in some common applications. With 10 iterations, I mean the amount of "layout phases" that are chained by a `requestNextPulse` during the previous layout phase. Once there is a layout phase without a `requestNextPulse`, I consider the rendering "stable".
This will have a few other major impacts that are hard to predict:
1. what about CSS passes? repeat those too? (probably yes -> really expensive)
2. the flow of apps will be completely different. As long as a pulse is running, no Runnables scheduled via Platform.runLater() can be executed. If you do 10 layout passes inside a pulse, the time between the Runnables being executed becomes an order of magnitude more than before, and that will have a major impact for some applications.
I fear that approach is going to be even more disruptive for existing applications.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1945#issuecomment-3457570782
More information about the openjfx-dev
mailing list