MongoDB incremental build, any trick to make it faster?

24 views
Skip to first unread message

Lianghong Xu

unread,
Jul 9, 2014, 9:12:18 AM7/9/14
to mongod...@googlegroups.com
Hi,

I've recently started some hacking on mongodb. However, the long compilation time is giving me a lot of headache.

After a full build, I made a small change to a header file (client/constant.h), and then re-build the code with:

scons -j2 mongod

However, the incremental build takes more than 40 minutes on my machine (2 cores, debian). Such long compilation time for every small change is very counterproductive and sometimes annoying. Admittedly, C++ compilation is time-consuming, but is there any way to make incremental build like this significantly faster? (e.g., is there anything like precompiled headers or any other tricks?)

Thanks,
Lianghong

Stephen Steneker

unread,
Jul 9, 2014, 10:25:08 PM7/9/14
to mongod...@googlegroups.com
Hi Lianghong,

I noticed you cross-posted this question to the mongodb-dev group (for discussion on development & contribution to MongoDB) and already have some suggestions there: https://groups.google.com/forum/#!topic/mongodb-dev/RZgwNLdA9Q4.

In general it's probably better to post on one forum and wait for reply rather than doubling up given there are overlapping audiences. In this case, mongodb-dev would be the more appropriate choice for questions on the MongoDB build process.

Some other suggestions that might be helpful: http://stackoverflow.com/questions/16097526/.

Regards,
Stephen
Reply all
Reply to author
Forward
0 new messages