Re: [Vala] plans to speed up compilation



Via valac's autotools support I'd assume you'd get
makefiles that make sure a.c isn't regenerated
if a.vala didn't change and then also "make -j" on
top of that to solve the CPU utilization issue?
To speed things up further you can use ccache or
similar to the gcc part.

However, since you didn't mention this as an alternative
I assume I'm missing some important clue here. For example,
does valac code generation has some sort of restriction
today that makes this "standard solution" impossible? If so,
it'd be interesting to hear more about what that problem is.


                Martin

On 05/21/2010 04:26 PM, Adam Dingle wrote:
I work at Yorba where we develop Shotwell, a photo manager currently
consisting of 45,000 lines of Vala code. Each time I build on my machine
(an 2.4 GHz Intel Core 2 Quad) 'valac --ccode' takes 10 seconds to run,
even if I've changed just 1 line of Vala source. (I'm talking *only*
about the time it takes to generate C code; we then invoke gcc on the
generated C code in a separate step.) 10 seconds isn't so tragic, but,
still, it would be nice for this to be faster. So I wonder if the Vala
team is considering changes to improve compilation speed for large
programs. I can see two basic approaches:

1) Modify valac to be multithreaded. As valac runs on my quad-core
machine, 3 of the 4 cores sit idle. If valac could use all 4 cores and
reduce my compile time from 10 seconds to 2.5 seconds I'd be very happy.

2) Hava valac write out some sort of intermediate data which can be
reused on subsequent compilations if source files haven't changed at
all. (Java works like this, sort of: when I build a Java program, javac
can read metadata from .class files generated in previous compilations,
I believe.)

Is the Vala team considering either of these approaches?

adam

_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]