[poppler] Migrating poppler to liblcms2 from liblcms1

Albert Astals Cid aacid at kde.org
Sat Jan 28 07:47:52 PST 2012


El Divendres, 27 de gener de 2012, a les 18:23:50, Albert Astals Cid va 
escriure:
> El Divendres, 27 de gener de 2012, a les 10:39:18, Maria, Marti va escriure:
> > Bon dia Albert,
> 
> Hola
> 
> > That makes a lot of sense. Lcms2 spends more time on optimizing the
> > transform in order to make it faster. That means create transform is
> > currently slower that lcms1 but applying transforms  is way faster. This
> > was indeed a design decision, as most of time creation of transforms
> > happens only once at the very beginning and then this transform is
> > applied to huge amounts of raster. The performance tests I send didn't
> > take creation time into account.
> > 
> > I will take this action item to review creation time in the next
> > release.
> > Otherwise, you may consider reusing transforms.
> 
> We reuse the transforms, it is just that this file has lots of them.
> 
> > That would speed up both
> > lcms1 and lcms2.  If this is not feasible, there is a flags
> > cmsFLAGS_NOOPTIMIZE, that makes transform creation fast, at the expense
> > of slower dotransfom operation. This is not recommended at all because
> > you disable all optimizations, but may solve the issue when creating
> > transforms that are applied only to few bytes.
> 
> Not sure if i can now to how many bytes it'll be applied but i'll do some
> testing and maybe just enable it for the time being so at least we have the
> same behaviour than when using lcms1, might not be faster but we not slower
> either.

Using cmsFLAGS_NOOPTIMIZE brings back altona_technical_1v2_x3.pdf to an 
acceptable speed again.

Koji can you please update your patch so it uses the cmsFLAGS_NOOPTIMIZE when 
compiling with lmcs2?

Albert

> 
> Thanks,
>   Albert
> 
> > Again, thanks for reporting. I'm putting the transform creation time
> > issue high in my priority list.
> > 
> > Best regards
> > 
> > Marti Maria,  Color Engineer
> > HP Large Format Printers Division - Barcelona
> > marti.maria at hp.com
> > 
> > 
> > 
> > -----Original Message-----
> > From: Albert Astals Cid [mailto:tsdgeos at gmail.com] On Behalf Of Albert
> > Astals Cid Sent: jueves, 26 de enero de 2012 19:43
> > To: poppler at lists.freedesktop.org
> > Cc: Maria, Marti; Till Kamppeter; seb128 at ubuntu.com
> > Subject: Re: [poppler] Migrating poppler to liblcms2 from liblcms1
> > 
> > El Dilluns, 23 de gener de 2012, a les 11:16:03, Maria, Marti va escriure:
> > > Hi,
> > > In my testings lcms2 is significantly faster that lcms1 except when
> > > using floating point, then lcms2 favors precision.
> > 
> > Is this precision is so important to justify a 10x slowliness? Maybe
> > it'd be a good idea to have a fallback fast mode for those not willing
> > to take that 10x hit?
> > 
> > > http://littlecms2.blogspot.com/2010/03/xput-comparative-119-vs-20.ht
> > > ml
> > > 
> > > Altona test does many different color conversions it would be
> > > interesting to know which transformation is going slow.
> > 
> > Attached the callgrind output of running poppler there, you can see the
> > time is almost totally spent on creating the transforms.
> > 
> > Wild guess: I'm wondering if the thing is that not transformations are
> > all precalculated (meaning a faster overall if you do lots of access)
> > and previously they were done each time and thus if we end up doing
> > "few" transformations it was just much faster?
> > 
> > Cheers,
> > 
> >   Albert
> >   
> > > Regards
> > > Marti
> > > 
> > > ________________________________________
> > > From: Till Kamppeter [till.kamppeter at gmail.com]
> > > Sent: Monday, January 23, 2012 8:58 AM
> > > To: Albert Astals Cid
> > > Cc: poppler at lists.freedesktop.org; Maria, Marti; Sebastien Bacher;
> > > Koji Otani Subject: Re: [poppler] Migrating poppler to liblcms2 from
> > > 
> > > liblcms1 On 01/22/2012 11:18 PM, Albert Astals Cid wrote:
> > > > Same thing, altona_technical_1v2_x3.pdf still goes up from x
> > > > seconds
> > > > to 10x seconds when going from lcms1 to lcms2.
> > > > 
> > > > That is in my opinion not acceptable (of course i'm not ruling
> > > > out
> > > > that we in poppler are using lcms2 wrong). Till, does your
> > > > ubuntu
> > > > work cover fixing the regressions of moving from lcms1 to lcms2
> > > > or
> > > > all your work covers is making stuff compile?
> > > 
> > > I downloaded altona_technical_1v2_x3.pdf from
> > > http://www.eci.org/doku.php?id=es:downloads and tried pdftops on
> > > Ubuntu Oneiric (11.10, lcms1) and on Precise (12.04, lcms2, Koji
> > > Otani's patch) and with lcms1 it takes 3.5 seconds and with lcms2
> > > 17.5
> > > seconds.
> > > 
> > > The same problem occurs with Ghostscript: There the same transition
> > > happened from Oneiric to Precise and here Oneiric is much faster
> > > with
> > > this file, too. In Precise PDF rendering for printing is done by
> > > Ghostscript and not by Poppler, so lcms2 is already used for
> > > printing
> > > in Precise for some time. As there are no performance complaints by
> > > users yet, it seems that for everyday files there is not such a
> > > significant performance loss. and this
> > > 
> > > Marti, can you check what is the problem with lcms2 and this PDF
> > > file
> > > and also why most files are somewhat slower with lcms2?
> > > 
> > >     Till
> > > 
> > > _______________________________________________
> > > poppler mailing list
> > > poppler at lists.freedesktop.org
> > > http://lists.freedesktop.org/mailman/listinfo/poppler
> 
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler


More information about the poppler mailing list