[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] Major performance regression for FT_LOAD_TARGET_LIGHT on ming
From: |
Jeroen Ooms |
Subject: |
[ft-devel] Major performance regression for FT_LOAD_TARGET_LIGHT on mingw-w64 |
Date: |
Mon, 31 Jul 2017 22:16:20 +0200 |
ImageMagick has a big performance bottleneck on mingw-w64 (windows)
caused by the use of FT_LOAD_TARGET_LIGHT. A minimal example:
https://gist.github.com/jeroen/ac238d8254197991da779ce44ee0b702
Calling FT_Load_Glyph() with FT_LOAD_TARGET_LIGHT leads to a 60x
performance regression. On my machine, the total time to run the
program above goes from 0.1s to 6.12 sec. I am using freetype 2.8 with
mingw-w64 gcc 7.1.0 from msys2, but I have also reproduced this
problem with gcc 4.9.3. This problem only seems to appear on mingw-w64
windows, both in 32bit and 64bit.
Interestingly, when FT_LOAD_TARGET_LIGHT is enabled, the cpu time for
each call to FT_Load_Glyph() is almost exactly 0.024s. This suggests
there is some sort of timeout or race condition.
In the example above, if we move FT_New_Face() outside of the loop,
only the first call to FT_Load_Glyph() is slow. All subsequent calls
are immediate. However in the context of e.g. ImageMagick recycling
the FT_Face is not an option.
I tried rebuilding freetype2 with various configurations but I was
unable to solve the problem.
- [ft-devel] Major performance regression for FT_LOAD_TARGET_LIGHT on mingw-w64,
Jeroen Ooms <=