[OpenJDK 2D-Dev] LineBreakMeasurer 7-70x slower on Java 10 compared to Java 8

Eirik Bakke ebakke at ultorg.com
Sat Sep 8 20:55:48 UTC 2018

Hi, 2D-dev.

Switching from Java 1.8.0_172 to Java 10.0.2, at least on Windows 10, it has become very expensive to call LineBreakMeasurer.nextLayout--it takes about 0.8ms to render any string, even if it's just a single character. That's between 7 and 70(!) times slower than on Java 8, depending on how many strings you need to render. See the following performance test (my results pasted at the end):


This is a problem in our visualization app, which uses LineBreakMeasurer to produce a TextLayout once for every cell in a large spreadsheet-like data layout. Operations that were previously quick or instantaneous now introduce bad latencies in the user interface.

I saw the related bug https://bugs.openjdk.java.net/browse/JDK-8186317 and its duplicate https://bugs.openjdk.java.net/browse/JDK-8196666, but they are both closed.

Is this a known regression, and are there any plans to fix it?

-- Eirik

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20180908/84c99f56/attachment.html>

More information about the 2d-dev mailing list