RFR: JDK-8269921 Text in Textflow and listeners on bounds can cause endless loop/crash and other performance issues [v2]

Florian Kirmaier fkirmaier at openjdk.java.net
Tue Jul 6 15:16:51 UTC 2021


On Tue, 6 Jul 2021 15:07:26 GMT, Florian Kirmaier <fkirmaier at openjdk.org> wrote:

>> modules/javafx.graphics/src/main/java/javafx/scene/text/Text.java line 386:
>> 
>>> 384:     private GlyphList[] getRuns() {
>>> 385:         if (textRuns != null) return textRuns;
>>> 386:         if (!isSpan()) {
>> 
>> Removing the call to `getParent().layout()` here seems very likely to cause a regression in behavior. This will need some further analysis and lots of testing.
>
> I agree the change is quite dangerous. 
> But the current behavior is in my opinion "broken by design". 
> updating bounds should never trigger layout. Group also has similar behavior, which causes issues from time to time.

I have the feeling, that this change changes much less behavior than expected.

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

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


More information about the openjfx-dev mailing list