[HarfBuzz] On hb_shape_plan() and other API for 1.0

Behdad Esfahbod behdad at behdad.org
Thu Apr 12 05:53:35 PDT 2012


On 04/12/2012 07:55 AM, Jonathan Kew wrote:
> On 12/4/12 02:47, Behdad Esfahbod wrote:
>> As a crude test, I profiled the Indic shaping, and am conjecturing that about
>> 10 to 20 percent of the time can be saved pre-planning the shaping process.
>> My testing showed no measurable saving for skipping the sanitizing process.

I should note that my comment re sanitize() having no measurable effect was
due to the fact that sanitize happens once per face creation and not per
hb_shape() call.  Which still means that we can postpone optimizing that.


>> Maybe both can wait (and not block a 1.0 release) since neither one seems to
>> be hugely effective.
> 
> A saving of 10-20% sounds pretty worthwhile to me -

I should note that my test case was with mostly one-word strings, so for real
world data the savings may be much less.  But I'll give it a try.


> and if 1.0 is supposed to
> provide a long-term stable API, then perhaps this should be done sooner rather
> than later.
> 
> Otherwise, there'll be a strong temptation to rev the API again shortly after
> 1.0 in order to achieve this performance boost.

Well, API *additions* can happen with every new release.  It's API changes /
deprecations we have to avoid (contractually).

But since the code is already organized to allow it, I'll give this a try now.

b

> JK
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/harfbuzz
> 



More information about the HarfBuzz mailing list