[poppler] More performance
Krzysztof Kowalczyk
kkowalczyk at gmail.com
Tue Sep 19 01:45:27 PDT 2006
Hello,
Another performance change: https://bugs.freedesktop.org/show_bug.cgi?id=8352
This change makes Stream::getRawChar() non-virtual (actually it removes it
completely from Stream and makes it into an interface that only streams that use
StreamPredictor use implement. This makes it calling getRawChar() much faster.
Hard to believe it but on my test file that has an image that causes to use
FlateStream with StreamPredictor this small change gives 15-45% in rendering a
page (depends on the page).
There's still room for improvement for example in
int FlateStream::getChar() {
if (pred) {
return pred->getChar();
} else {
return getRawChar();
}
}
doing the if () for every character read will probably accumulate. I think I
came up with the scheme that would implement 2 versions of each stream that
might use StreamPredictor, to eliminate this if (), but that's a bigger change.
-- kjk | http://blog.kowalczyk.info
More information about the poppler
mailing list