I am displaying a HTML page with CSS in a WebView.
When using non-solid table cell borders (e.g. dotted or dashed) in relatively wide tables, the rendering performance is unbearably bad and blocks the whole UI. When using a solid border instead, everything is fine.
The page I attach below takes about 30 seconds for me to render in a maximized window. When taking any action like scrolling, the page is re-rendered, taking the same amount of time and blocking the UI.
When I pause the application with a debugger, you can clearly see that it's actually waiting for the renderer:
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)
at com.sun.javafx.tk.quantum.PaintCollector.waitForRenderingToComplete(PaintCollector.java:157)
at com.sun.javafx.tk.quantum.GlassScene.waitForRenderingToComplete(GlassScene.java:116)
at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2376)
[...]
As stated above, using a solid border instead works fine (as in much much more quickly).
The Java code does not matter; a simple scene with just a WebView loading the page works to reproduce the problem.
HTML page: http://pastebin.com/BycKjvZ0
CSS: http://pastebin.com/SGcbz1Xv (name it "style.css" in the same directory).
(The border in question is defined in the "table.listing td" selector.)
When using non-solid table cell borders (e.g. dotted or dashed) in relatively wide tables, the rendering performance is unbearably bad and blocks the whole UI. When using a solid border instead, everything is fine.
The page I attach below takes about 30 seconds for me to render in a maximized window. When taking any action like scrolling, the page is re-rendered, taking the same amount of time and blocking the UI.
When I pause the application with a debugger, you can clearly see that it's actually waiting for the renderer:
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)
at com.sun.javafx.tk.quantum.PaintCollector.waitForRenderingToComplete(PaintCollector.java:157)
at com.sun.javafx.tk.quantum.GlassScene.waitForRenderingToComplete(GlassScene.java:116)
at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2376)
[...]
As stated above, using a solid border instead works fine (as in much much more quickly).
The Java code does not matter; a simple scene with just a WebView loading the page works to reproduce the problem.
HTML page: http://pastebin.com/BycKjvZ0
CSS: http://pastebin.com/SGcbz1Xv (name it "style.css" in the same directory).
(The border in question is defined in the "table.listing td" selector.)
- relates to
-
JDK-8170998 Styled dashed borders in HTML5 table don't line up correctly in WebView
- Open