Compiling in memory

The Crux wiki has been getting a facelift recently (not by me of course — I hardly think myself qualified), and one of the gems that has come to the surface is this little monster — how to speed up compilation by building software in memory.

I tried it out yesterday with Leafpad, building one version in a regular directory, and then again with a work directory in memory. On a relatively small program like that (and on a machine with only 512Mb total, which meant only about 256Mb as a tmpfs folder) I got a drop of about three seconds off the old 28-second compilation time.

You can try it yourself and see if the results are improvements for you — use time prt-get depinst whatever-pkg and you’ll get a breakdown on how long it took to finish the job. Like I said, a small program saw a nice reduction, but you’ll need a lot of memory to compile some of the bigger ones. (I tried to install recorder with the folder in memory, but forgot that it requires cmake for some of the dependencies, which quickly ate up all the space it had.)

So from my perspective, the description in the wiki is fairly accurate — it does cut down on the time it takes to compile, but it also takes quite a bit of space to use that trick. Those of us on older machines might just have to suffer. :( :D

About these ads

0 Responses to “Compiling in memory”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Visit the Wiki!

Some recent desktops

May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF

May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games

Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers


This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,963,317 hits



Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: