Probably because of small realloc increment size, GfxFont::readEmbFontFile takes painfully slow to complete. The font is Mingliu, it's embedded, it's size is 13MB, but still...
File is too big - it can be downloaded here: https://drive.google.com/file/d/0BxCcB4V7CT9mdzJuYnM2dVMwdDg/edit?usp=sharing
43 secs? on which hardware/OS? it renders in 472msec here.
Hi Albert! I have a Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz, 4GB, Win7SP1 x64 build, my poppler build is also x64. The render code that I use is the following: -------------------------------------------- SplashColor bgColor; bgColor[0] = bgColor[1] = bgColor[2] = 255; SplashOutputDev splash(splashModeXBGR8, 4, gFalse, bgColor, gTrue, gTrue, splashThinLineDefault, gFalse); splash.setVectorAntialias(gTrue); splash.setFreeTypeHinting(gTrue, gTrue); splash.startDoc(pDoc); pDoc->displayPageSlice(&splash, iPage, 72, 72, 0, false, true, false, -1, -1, -1, -1); -------------------------------------------- note XBGR8 mode. Could that be the case, or x64 build? I can produce more precise profiling measures if you like.
Windows? Try it on Linux
He didn't come back to us, let's assume he found out what was wrong.
Yes, I manually changed the call in GfxFont::readEmbFontFile to buf = (char*)str->toUnsignedChars(len, 65536, 65536); and it became much faster.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.