[PATCH v2 3/3] xfree86: Remove libxorg convenience library to speed up build

Dan Nicholson dbn.lists at gmail.com
Fri Jun 17 11:31:45 PDT 2011


On Fri, Jun 17, 2011 at 8:44 AM, Gaetan Nadon <memsize at videotron.ca> wrote:
> On Fri, 2011-06-17 at 16:27 +0100, Daniel Stone wrote:
>
> Are you fine with the following patch, which readds the _DEPENDENCIES
> magic to relink Xorg whenever any of the relevant source files have
> changed? If so, I'll integrate that into my tree and send out a pull
> request for 1.11 when a couple of smaller changes have been reviewed,
> including a dependencies patch for test/ which makes sure it gets
> rebuilt as well.
>
>
> I would take this opportunity to check performance before/after the patch.
> From my limited understanding, this kind of construct is partially
> responsible for slowing down make. At least it would identifying which code
> impacts performance.

I threw together a little test script:

#!/bin/bash

build()
{
        echo "Building $1"
        git checkout $1 &>/dev/null
        git clean -xdf >/dev/null
        ./autogen.sh --disable-docs --disable-devel-docs \
                --disable-unit-tests &>$1.log &&
                time -p make -j4 &>>$1.log
        echo "After dirtying hw/xfree86/common/xf86Xinput.c in $1"
        touch hw/xfree86/common/xf86Xinput.c
        time -p make -j4 &>>$1.log
}

build no-libxorg && build master

Here's the results:

Building no-libxorg
real 173.41
user 228.54
sys 38.06
After dirtying hw/xfree86/common/xf86Xinput.c in no-libxorg
real 3.88
user 2.60
sys 0.92
Building master
real 176.86
user 229.29
sys 39.54
After dirtying hw/xfree86/common/xf86Xinput.c in master
real 6.49
user 3.86
sys 1.91

So, it saves a few seconds for me. However, the case that Daniel has
to cope with is the "dirtying" case where you're just making a couple
changes but have to wait for libxorg to get rebuilt. For me, the time
is almost cut in half.

--
Dan


More information about the xorg-devel mailing list