- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Re: compile speed
Thu, 2011-12-15, 06:00
How much of that 128 GB are fsc/scalac using?
--Rex
On Wed, Dec 14, 2011 at 11:56 PM, S Wade <swadenator@gmail.com> wrote:
--Rex
On Wed, Dec 14, 2011 at 11:56 PM, S Wade <swadenator@gmail.com> wrote:
I have 128gb on that machine, so I don't think it's memory.
thanks,
wade
On Dec 14, 2011, at 11:34 PM, Andrew Gaydenko <andrew.gaydenko@gmail.com> wrote:
> On Wednesday 14 December 2011 21:58:18 S Wade wrote:
>> I'm noticing that my project (3,364 lines of code including comments)
>> compiles (with either scalac or fsc) very slowly in general and
>> particularly slowly on networked filesystems (the situation is even worse
>> with -optimise). Some details are listed below. Is this expected? I'm
>> running scala 2.9.1.final on a intel i7 linux box.
>>
>> thanks,
>> wade
>>
>>
>> Local filesystem
>> ============
>>
>> local$ time scalac -cp lib/mongo-2.6.5.jar:Utils/Utils.jar -d build
>> src/*.scala
>>
>> real 1m18.409s
>> user 1m39.777s
>> sys 0m3.909s
>> ....
>
> Insufficient RAM?
>
> For ~18K lines of code (or ~24K with blank and comments) I get about 50
> seconds on i5 at 3.2 GHz, 8GB RAM at 1600 MHz. Linux also.
>
> On Wednesday 14 December 2011 23:19:18 Maxime Lévesque wrote:
>> I gave up on compiling on anything on else than solid state drives,
>> and my quality of life has increased dramatically.
>
> With sufficient RAM (and normal operating system) HDD activity (after the
> first project building) is almost zero due to filesystem caching.
>
>
> Andrew
Thanks for the pointer. I ran the prior numbers with defaults for the scalac and fsc which must have been less than 2g (see numbers below).
See below for what happens when I set -Xmx2g. Basically no change when compiling on the local filesystem, but 4x improvement on a networked filesystem. It's still very slow, but it's getting better!
thanks,wade
Local Filesystem=============
local$ time scalac -J-Xmx2g -cp lib/mongo-2.6.5.jar:Utils/Utils.jar -d build src/*.scala real 1m9.004suser 1m42.187ssys 0m3.809s
local$ time fsc -J-Xmx2g -cp lib/mongo-2.6.5.jar:Utils/Utils.jar -d build src/*.scala
real 1m10.473suser 0m0.590ssys 0m0.145s
local$ time fsc -J-Xmx2g -cp lib/mongo-2.6.5.jar:Utils/Utils.jar -d build src/*.scala
real 0m31.401s user 0m0.563ssys 0m0.128s
Networked Filesystem================
nfs$ time scalac -J-Xmx2g -cp lib/mongo-2.6.5.jar:Utils/Utils.jar -d build src/*.scala
real 0m43.944suser 1m1.960ssys 0m1.260s
nfs$ time fsc -J-Xmx2g -cp lib/mongo-2.6.5.jar:Utils/Utils.jar -d build src/*.scala
real 0m39.768suser 0m0.250ssys 0m0.030s
nfs$ time fsc -J-Xmx2g -cp lib/mongo-2.6.5.jar:Utils/Utils.jar -d build src/*.scala
real 0m26.054s user 0m0.200ssys 0m0.050s
On Thu, Dec 15, 2011 at 12:00 AM, Rex Kerr <ichoran@gmail.com> wrote: