Bug 8315

Summary: Use buffered i/o in ImageStream::getLine() for 10-25% rendering speed improvement
Product: poppler Reporter: Krzysztof Kowalczyk <kkowalczyk>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: buffered i/o for ImageStream::getLine()

Description Krzysztof Kowalczyk 2006-09-17 17:50:54 UTC
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.
Comment 1 Krzysztof Kowalczyk 2006-09-17 17:52:12 UTC
Created attachment 7034 [details] [review]
buffered i/o for ImageStream::getLine()
Comment 2 Krzysztof Kowalczyk 2006-09-17 17:52:35 UTC
BTW: this patch depends on my previous patches to add buffered i/o infrastructure.
Comment 3 Albert Astals Cid 2011-06-19 14:55:30 UTC
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.