[HarfBuzz] Optmizing code using Harfbuzz

Tom Hacohen tom.hacohen at partner.samsung.com
Thu Nov 4 08:34:36 PDT 2010


On Thu, 2010-11-04 at 21:56 +0630, Keith Stribley wrote:
> I assume you have implemented a Glyph Metric cache and perhaps a cmap 
> lookup cache? If you are using freetype it definitely benefits from it.

First of all, the change was when adding harfbuzz, I had a working code
before (with freetype) that was blazing fast. Checking with callgrind, I
can see that harfbuzz is what taking all the CPU time, nothing more than
that, so I don't see how the two are relevant. But yes, I have a lot of
caching with freetype, and I also somehow cache the harfbuzz results.

After reviewing my code (well, it's not really my code) once more I
noticed that I destroy harfbuzz cache quite often, I guess that's the
issue I was experiencing, but still, I was destroying other caches as
well and harfbuzz was the biggest CPU hog by far (95% harfbuzz and 5%
the rest or something like that).

Thanks,
Tom.




More information about the HarfBuzz mailing list