[poppler] Migrating poppler to liblcms2 from liblcms1

Koji Otani sho at bbr.jp
Mon Jan 30 01:46:05 PST 2012


I attached a patch using cmsFLAGS_NOOPTIMIZE.
I also fixed a bug when using lcms1.
---
Koji Otani

From: Albert Astals Cid <aacid at kde.org>
Subject: Re: [poppler] Migrating poppler to liblcms2 from liblcms1
Date: Sat, 28 Jan 2012 16:47:52 +0100
Message-ID: <4901739.zfF41fXVq6 at xps>

aacid> El Divendres, 27 de gener de 2012, a les 18:23:50, Albert Astals Cid va 
aacid> escriure:
aacid> > El Divendres, 27 de gener de 2012, a les 10:39:18, Maria, Marti va escriure:
aacid> > > Bon dia Albert,
aacid> > 
aacid> > Hola
aacid> > 
aacid> > > That makes a lot of sense. Lcms2 spends more time on optimizing the
aacid> > > transform in order to make it faster. That means create transform is
aacid> > > currently slower that lcms1 but applying transforms  is way faster. This
aacid> > > was indeed a design decision, as most of time creation of transforms
aacid> > > happens only once at the very beginning and then this transform is
aacid> > > applied to huge amounts of raster. The performance tests I send didn't
aacid> > > take creation time into account.
aacid> > > 
aacid> > > I will take this action item to review creation time in the next
aacid> > > release.
aacid> > > Otherwise, you may consider reusing transforms.
aacid> > 
aacid> > We reuse the transforms, it is just that this file has lots of them.
aacid> > 
aacid> > > That would speed up both
aacid> > > lcms1 and lcms2.  If this is not feasible, there is a flags
aacid> > > cmsFLAGS_NOOPTIMIZE, that makes transform creation fast, at the expense
aacid> > > of slower dotransfom operation. This is not recommended at all because
aacid> > > you disable all optimizations, but may solve the issue when creating
aacid> > > transforms that are applied only to few bytes.
aacid> > 
aacid> > Not sure if i can now to how many bytes it'll be applied but i'll do some
aacid> > testing and maybe just enable it for the time being so at least we have the
aacid> > same behaviour than when using lcms1, might not be faster but we not slower
aacid> > either.
aacid> 
aacid> Using cmsFLAGS_NOOPTIMIZE brings back altona_technical_1v2_x3.pdf to an 
aacid> acceptable speed again.
aacid> 
aacid> Koji can you please update your patch so it uses the cmsFLAGS_NOOPTIMIZE when 
aacid> compiling with lmcs2?
aacid> 
aacid> Albert
aacid> 
aacid> > 
aacid> > Thanks,
aacid> >   Albert
aacid> > 
aacid> > > Again, thanks for reporting. I'm putting the transform creation time
aacid> > > issue high in my priority list.
aacid> > > 
aacid> > > Best regards
aacid> > > 
aacid> > > Marti Maria,  Color Engineer
aacid> > > HP Large Format Printers Division - Barcelona
aacid> > > marti.maria at hp.com
aacid> > > 
aacid> > > 
aacid> > > 
aacid> > > -----Original Message-----
aacid> > > From: Albert Astals Cid [mailto:tsdgeos at gmail.com] On Behalf Of Albert
aacid> > > Astals Cid Sent: jueves, 26 de enero de 2012 19:43
aacid> > > To: poppler at lists.freedesktop.org
aacid> > > Cc: Maria, Marti; Till Kamppeter; seb128 at ubuntu.com
aacid> > > Subject: Re: [poppler] Migrating poppler to liblcms2 from liblcms1
aacid> > > 
aacid> > > El Dilluns, 23 de gener de 2012, a les 11:16:03, Maria, Marti va escriure:
aacid> > > > Hi,
aacid> > > > In my testings lcms2 is significantly faster that lcms1 except when
aacid> > > > using floating point, then lcms2 favors precision.
aacid> > > 
aacid> > > Is this precision is so important to justify a 10x slowliness? Maybe
aacid> > > it'd be a good idea to have a fallback fast mode for those not willing
aacid> > > to take that 10x hit?
aacid> > > 
aacid> > > > http://littlecms2.blogspot.com/2010/03/xput-comparative-119-vs-20.ht
aacid> > > > ml
aacid> > > > 
aacid> > > > Altona test does many different color conversions it would be
aacid> > > > interesting to know which transformation is going slow.
aacid> > > 
aacid> > > Attached the callgrind output of running poppler there, you can see the
aacid> > > time is almost totally spent on creating the transforms.
aacid> > > 
aacid> > > Wild guess: I'm wondering if the thing is that not transformations are
aacid> > > all precalculated (meaning a faster overall if you do lots of access)
aacid> > > and previously they were done each time and thus if we end up doing
aacid> > > "few" transformations it was just much faster?
aacid> > > 
aacid> > > Cheers,
aacid> > > 
aacid> > >   Albert
aacid> > >   
aacid> > > > Regards
aacid> > > > Marti
aacid> > > > 
aacid> > > > ________________________________________
aacid> > > > From: Till Kamppeter [till.kamppeter at gmail.com]
aacid> > > > Sent: Monday, January 23, 2012 8:58 AM
aacid> > > > To: Albert Astals Cid
aacid> > > > Cc: poppler at lists.freedesktop.org; Maria, Marti; Sebastien Bacher;
aacid> > > > Koji Otani Subject: Re: [poppler] Migrating poppler to liblcms2 from
aacid> > > > 
aacid> > > > liblcms1 On 01/22/2012 11:18 PM, Albert Astals Cid wrote:
aacid> > > > > Same thing, altona_technical_1v2_x3.pdf still goes up from x
aacid> > > > > seconds
aacid> > > > > to 10x seconds when going from lcms1 to lcms2.
aacid> > > > > 
aacid> > > > > That is in my opinion not acceptable (of course i'm not ruling
aacid> > > > > out
aacid> > > > > that we in poppler are using lcms2 wrong). Till, does your
aacid> > > > > ubuntu
aacid> > > > > work cover fixing the regressions of moving from lcms1 to lcms2
aacid> > > > > or
aacid> > > > > all your work covers is making stuff compile?
aacid> > > > 
aacid> > > > I downloaded altona_technical_1v2_x3.pdf from
aacid> > > > http://www.eci.org/doku.php?id=es:downloads and tried pdftops on
aacid> > > > Ubuntu Oneiric (11.10, lcms1) and on Precise (12.04, lcms2, Koji
aacid> > > > Otani's patch) and with lcms1 it takes 3.5 seconds and with lcms2
aacid> > > > 17.5
aacid> > > > seconds.
aacid> > > > 
aacid> > > > The same problem occurs with Ghostscript: There the same transition
aacid> > > > happened from Oneiric to Precise and here Oneiric is much faster
aacid> > > > with
aacid> > > > this file, too. In Precise PDF rendering for printing is done by
aacid> > > > Ghostscript and not by Poppler, so lcms2 is already used for
aacid> > > > printing
aacid> > > > in Precise for some time. As there are no performance complaints by
aacid> > > > users yet, it seems that for everyday files there is not such a
aacid> > > > significant performance loss. and this
aacid> > > > 
aacid> > > > Marti, can you check what is the problem with lcms2 and this PDF
aacid> > > > file
aacid> > > > and also why most files are somewhat slower with lcms2?
aacid> > > > 
aacid> > > >     Till
aacid> > > > 
aacid> > > > _______________________________________________
aacid> > > > poppler mailing list
aacid> > > > poppler at lists.freedesktop.org
aacid> > > > http://lists.freedesktop.org/mailman/listinfo/poppler
aacid> > 
aacid> > _______________________________________________
aacid> > poppler mailing list
aacid> > poppler at lists.freedesktop.org
aacid> > http://lists.freedesktop.org/mailman/listinfo/poppler
aacid> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lcms2-120130.patch
Type: text/x-patch
Size: 10928 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20120130/3da8a61d/attachment.bin>


More information about the poppler mailing list