You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have these two videos. The first is the existing behavior observed on the latest release of RichTextFX:
V7La6Gz3og.mp4
Things to note:
Scrolling vertically is fine and presents no issue
Scrolling horizontally triggers excessive scene layout updates which causes the application to visually stutter (the many layout updates block the UI thread)
I created a "hack" to address this. The hack is simple. In ParagraphBox I removed graphicOffset.addListener(obs -> requestLayout());. This is not a viable solution, but it illustrates something important, the horizontal scrolling is now very smooth.
kWG5oHWKD9.mp4
However the problem with this "hack" is that now that the x coordinate of the graphic is no longer used to fix paragraph layout updates you can get funky incorrect layouts like this:
I think there is something to be done here with reducing the level of work the FX thread has to do, as without this hack everything between the ParagraphBox and the scene root (unless you have an unmanaged node in the chain) gets invalidated and must be laid out again and again every frame while scrolling horizontally.
I have these two videos. The first is the existing behavior observed on the latest release of RichTextFX:
V7La6Gz3og.mp4
Things to note:
I created a "hack" to address this. The hack is simple. In
ParagraphBoxI removedgraphicOffset.addListener(obs -> requestLayout());. This is not a viable solution, but it illustrates something important, the horizontal scrolling is now very smooth.kWG5oHWKD9.mp4
However the problem with this "hack" is that now that the
xcoordinate of the graphic is no longer used to fix paragraph layout updates you can get funky incorrect layouts like this:I think there is something to be done here with reducing the level of work the FX thread has to do, as without this hack everything between the
ParagraphBoxand the scene root (unless you have an unmanaged node in the chain) gets invalidated and must be laid out again and again every frame while scrolling horizontally.