Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using lcms2 in Poppler or Ghostscript slows down rendering performance #2

Closed
tillkamppeter opened this issue Jan 23, 2012 · 3 comments

Comments

@tillkamppeter
Copy link

For Ubuntu Precise (12.04) we want to migrate completely from the old liblcms1 to liblcms2, as the new library is maintained upstream:

https://bugs.launchpad.net/ubuntu/+source/lcms/+bug/885324

Unfortunately there is a regression in liblcm2. Most files get rendered slightly slower (5-10%) when Poppler is linked with liblcms2 instead of liblcms1 (for Ghostscript I have no test results).

But most important is that some files render significantly slower. An example is altona_technical_1v2_x3.pdf from http://www.eci.org/doku.php?id=es:downloads. Simply run it through "pdftops" (convert to PostScript with Poppler) or "gs" (screen-display with Ghostscript) on Ubuntu Onneiric (11.10, using liblcms1) and Ubuntu Precise (12.04, using liblcms2) and you see that the rendering is between 5 and 10 times slower with liblcms2. See also comments #16, #37 and #38 on

https://bugs.launchpad.net/ubuntu/+source/lcms/+bug/885324

and

http://www.mail-archive.com/poppler@lists.freedesktop.org/msg06258.html

@mstimberg
Copy link

I ran pdftops altona_technical_1v2_x3.pdf through valgrind. The problem seems to be that cmsStageSampleCLut16 in cmslut.c ends up calling XFormSampler16 (cmsopt.c) 10 million times which eventually leads to 30 million calls of DefaultEvalParametricFunction (cmsgamma.c). The calculations call the math library's pow function 60 million times in total which seems to be where most of the time is spent.

@thomas-weber
Copy link

Is this issue still relevant? I tried to reproduce the number of calls in mstimberg's comment, but I'm unable to do so with lcms2 2.8. There, DefaultEvalParametricFunction is called 29053 times.

@mm2
Copy link
Owner

mm2 commented May 23, 2020

Historical issue that finally I can close :-)
just use the fast float plug-in, included in lcms2-2.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants