The attached patch makes ImageStream::getLine() use buffered i/o. For certain kind of images it gives 10-25% speed improvement in rendering page. It also shows that virtual getChar() is very expensive. Before the change, FlateStream::getChar() and ImageStream::getLine() were 2 most expensive functions. After the change, ImageStream::getLine() dropped to position 17 and FlateStream::readSome() (which replaced FlateStream::getChar()) to position 16. And if someone is interested in improving the speed of this scenario even futher, now the most expensive function is Splash::fillImageMask() and 3rd most expensive is _ftol2_pentium4 (called from Splash::fillImageMask()) so improving fillImageMask() would give the biggest boost.
Created attachment 7034 [details] [review] buffered i/o for ImageStream::getLine()
BTW: this patch depends on my previous patches to add buffered i/o infrastructure.
Patch does not apply anymore and it seems you are not interested in poppler so i'm closing the bug
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.