Hello. My application has the following issue: it reads the external font files tens thousands times a minute. I'm using Qt 5.6.1, so I've checked bugtracker and backported the https://bugreports.qt.io/browse/QTBUG-49452 fix from Qt 5.6.2 branch. That helped a lot, but really not fully. Now font files are read about a one thousand times per minute. Looks like glyphs are going to cache but still re-read every time.
QFontEngineFT::Glyph *QFontEngineFT::loadGlyphFor(...) { ... Glyph *glyph = glyphSet != 0 ? glyphSet->getGlyph(g, subPixelPosition) : 0; if (!glyph || glyph->format != format || (!fetchBoundingBox && !glyph->data)) { ... glyph = loadGlyph(glyphSet, g, subPixelPosition, format, false); ... } return glyph; } Reason is: glyph->data is null at all times, so QTBUG-49452 fix checks it and returns NULLPTR, but on the next pass we are loading this glyph again and again. What check or QFontCache improvement will be the best in this case?
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest