[Scons-users] SCons vs Meson for Python projects

Dirk Bächle tshortik at gmx.de
Wed Nov 23 13:18:33 EST 2016


Hi Gour,

good to hear from you again. ;)

On 23.11.2016 08:54, Saša Janiška wrote:
> Hello,
>
> I was playing with SCons in the past, but didn’t switch since setuptools
> did whatever I need.
>
> ...
>
> Meson looks very attractive and fast with a custom DSL to define
> configuration and by looking at its comparison
> (https://github.com/mesonbuild/meson/wiki/Simple%20comparison) it seems
> that SCons’ slowness (especially for ’empty build’) is the only ’cons’
> (pun intended). :-)
>

I know this comparison well and had tried to inform Jussi Pakkanen about the possibility of speeding up SCons' default behaviour 
(optimized for correctness and stability of your builds), by using additional command-line parameters like "--max-drift=1 
--implicit-deps-unchanged". Here's an excerpt from his answer (email from 2014-08-14):

"[...]  I'm sure most of the systems tested can be tweaked to perform faster, but the point of the test was to compare the 
performance out of the box. This corresponds to the common use case for an average user. An unfortunate fact of life is that most 
users don't read manuals far enough to find these sorts of performance hints. ;-)

This is why Meson is designed so that all possible (safe) speedups are used automatically and if advanced users want to do their own 
things, then those should be possible. As an example Meson does not support wildcard globbing natively but does allow users to do 
that if they really want. [...]"


> Jamier Allsop in his presentation
> (https://www.youtube.com/watch?v=h_HhBT6xGeE&t=321s) about Cuppa
> answered the question in regard to the slowness of SCons that is it
> mostly FUD. Moreover, I was watching (again) Birk’s talk “Why SCons is
> not slow” where he mentioned a patch due to spawn problem, but whne
> looking in wiki (https://bitbucket.org/scons/scons/wiki/Roadmap) there
> is still “Integrating stubprocess.py wrapper for speedup” task with
> “wip” status aiming at 2.5 release, so just wonder if it’s still wip or
> it is done?
>

The patch still needs to be integrated, so it's "work in progress".

> (My projects will probably not grow up to >10k files, but still wonder
> about that.)
>
> So, is there anyone familiar with both build systems and/or can give some
> insight whether you consider SCons suitable as build system for
> Python-based projects?
>

Taking into account Jussi's approach for "comparing build systems" as described above, and having done quite some work on analysing 
SCons' performance I'd be inclined to state that SCons is up to par with most existing build systems...independent of *what* you're 
trying to build. As soon as you leave the area of "toy projects" and do some real work in your C/C++ classes, the time for actually 
compiling the sources will be the dominant factor.
You'll definitely be fine with the current release when staying around 10k files, the situation for larger projects (100k files and 
more) will improve as soon as the mentioned patch is integrated.

Best regards,

Dirk



More information about the Scons-users mailing list