[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] RFR: 8210384: SunLayoutEngine.isAAT() font is expensive on MacOS
From:       Dmitry Markov <dmitry.markov () oracle ! com>
Date:       2018-09-09 9:55:59
Message-ID: C78ED3F9-D543-459B-B8AD-B1C7F84607B4 () oracle ! com
[Download RAW message or body]

The fix looks good to me.
These changes will be useful for JDK 8u too. So I will back-port them once \
https://bugs.openjdk.java.net/browse/JDK-8201801 \
<https://bugs.openjdk.java.net/browse/JDK-8201801> is integrated.

Thanks,
Dmitry

> On 8 Sep 2018, at 20:51, Philip Race <philip.race@oracle.com> wrote:
> 
> bug: https://bugs.openjdk.java.net/browse/JDK-8210384
> webrev: http://cr.openjdk.java.net/~prr/8210384/
> 
> AAT is the Apple alternative to OpenType layout.
> 
> Calls to the Harfbuzz layout engine need to pass a flag which says whether the font \
> is an AAT font because we need to set up transforms differently. It is also looking \
> like it is needed for JDK 8 with ICU because of problems handling AAT fonts  there.
> The current way of doing this via checking if there is a morx table is really \
> expensive. So this fix adds a low-cost cache of the result.
> No regression test because it is a performance fix but I did check the effect.
> In a quick test rendering about 15 strings which broke up into 132 different runs,
> this reduced overall rendering time by 50% (and that includes the time to draw the \
> glyphs, so it is an even bigger component of layout).
> 
> -phil.
> 
> 
> 
> 


[Attachment #3 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html; \
charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: \
space; line-break: after-white-space;" class="">The fix looks good to me.<div \
class="">These changes will be useful for JDK 8u too. So I will back-port them \
once&nbsp;<font face="Arial" class=""><a \
href="https://bugs.openjdk.java.net/browse/JDK-8201801" \
class="">https://bugs.openjdk.java.net/browse/JDK-8201801</a></font>&nbsp;is \
integrated.<br class=""><div class=""><br class=""></div><div \
class="">Thanks,</div><div class="">Dmitry</div><div class=""><div><br \
class=""><blockquote type="cite" class=""><div class="">On 8 Sep 2018, at 20:51, \
Philip Race &lt;<a href="mailto:philip.race@oracle.com" \
class="">philip.race@oracle.com</a>&gt; wrote:</div><br \
class="Apple-interchange-newline"><div class=""><div class="">bug: <a \
href="https://bugs.openjdk.java.net/browse/JDK-8210384" \
class="">https://bugs.openjdk.java.net/browse/JDK-8210384</a><br class="">webrev: <a \
href="http://cr.openjdk.java.net/~prr/8210384/" \
class="">http://cr.openjdk.java.net/~prr/8210384/</a><br class=""><br class="">AAT is \
the Apple alternative to OpenType layout.<br class=""><br class="">Calls to the \
Harfbuzz layout engine need to pass a flag which says whether the font is an AAT \
font<br class="">because we need to set up transforms differently. It is also looking \
like it is needed for JDK 8<br class="">with ICU because of problems handling AAT \
fonts &nbsp;there.<br class="">The current way of doing this via checking if there is \
a morx table is really expensive.<br class="">So this fix adds a low-cost cache of \
the result.<br class="">No regression test because it is a performance fix but I did \
check the effect.<br class="">In a quick test rendering about 15 strings which broke \
up into 132 different runs,<br class="">this reduced overall rendering time by 50% \
(and that includes the time to draw the glyphs,<br class="">so it is an even bigger \
component of layout).<br class=""><br class="">-phil.<br class=""><br class=""><br \
class=""><br class=""><br class=""></div></div></blockquote></div><br \
class=""></div></div></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic