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

Eirik Bakke ebakke at ultorg.com
Sun Sep 9 00:23:30 UTC 2018

Ah, yes, I missed that one--thank you! Great to hear.

(Otherwise very happy to get a shiny new font shaping engine in Java--thanks for your efforts!)

-- Eirik

From: Philip Race <philip.race at oracle.com>
Sent: Saturday, September 8, 2018 6:03 PM
To: Eirik Bakke <ebakke at ultorg.com>
Cc: 2d-dev <2d-dev at openjdk.java.net>
Subject: Re: [OpenJDK 2D-Dev] LineBreakMeasurer 7-70x slower on Java 10 compared to Java 8

You missed https://bugs.openjdk.java.net/browse/JDK-8202131

It is on my to-do list ..


On 9/8/18, 1:55 PM, Eirik Bakke wrote:
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/20180909/b7a9b5db/attachment-0001.html>

More information about the 2d-dev mailing list