CMake vs autotools: poppler

Poppler has a CMake ebuild now. Given how poppler is used it seems to me quite a bad move, poppler is small and used in system that may not have cmake already installed.

I run some numbers when wesnoth moved to cmake and claimed that it took about twice for me to build wesnoth+cmake on a phenom and building wesnoth alone took nearly the same time. Later a friend of mine wanted to play with me with wesnoth and given her pc is a _bit_ old, took ages to build an up to date wesnoth, about twice the time you may consider bearable thanks to the cmake switch.

Let’s see what means switching poppler to CMake now, after the previous post I got some news of nice improvements, hopefully it improved even more while I wasn’t watching.

Now some numbers:

I have my system in need to update poppler, still the phenom I used the other time, it is doing nothing right now:

cat /proc/cpuinfo | grep model_name
model name : AMD Phenom(tm) 9500 Quad-Core Processor

first: I need cmake

cmake ebuild tell me that I need xmlrpc-c with curl and curl with a kind of ssl support. I don’t see the point of having an xmlrpc library and two xml libraries for a make system, well let’s set the right useflags and trigger emerge cmake

time says

real 8m9.854s
user 13m8.121s
sys 3m7.664s

qlop on the cut down emerge.log says

domino ~ # qlop -t cmake -f mylog
cmake: 207 seconds average for 1 merges
domino ~ # qlop -t curl -f mylog
curl: 233 seconds average for 1 merges
domino ~ # qlop -t xmlrpc-c -f mylog
xmlrpc-c: 40 seconds average for 1 merges

So cmake is taking about the time of curl and it’s indeed faster to build that before (it alone), still autoconf+autotools take less than 60s here, and if we factor in the deps then we still have large margin for improvements (please make xmlrpc-c, curl, libxml and expat optional)

app-text/poppler

takes about 37-40 seconds

Hacking a bare ebuild w/out touching poppler configure.ac makes it take about 60-66 seconds

So if you are having cmake already installed this poppler ebuild is _quite_ an huge improvement. If you are wondering why that happens I could guess that given that poppler is quite small the cmake quicker configure step gives this large boost, probably not having libtool in the way helps as well.

To sum up:
– the cmake poppler builds quite faster than autotools poppler.
– CMake improved a lot its build time, yet is largely bloated and could enjoy a trim.
– Poppler configure.ac probably could be improved to be in line with the cmake times.