slow compilations

hello all:

I am working on a mud written in c++ that's moving upwards of 35k lines of code at the moment. I have elimenated a ton of boost and started moving to c++11, which actually cut down my compilation time to under 1 minute. I was working on the code again this afternoon and my entire compilation with nothing really changed but a few lines of code is now over 3 minutes. I have no clue where the issue is, but this server just seems fairly slow in general. I do a lot of ECR, so having compilation take this long (even if I don't do a full clean it's a bit rough) kind of sucks. Is there a way of improving this? I don't know why I'd be seeing such a huge difference on the linode.

3 Replies

Just curious, what advantages are there to compiling on a VPS instead of locally?

Filesystem can make a difference. If you are willing to experiment try making a small test partition with ReiserFS and see if that speeds up your compile (making sure you compile on the partition of course).

Also if, for some reason, you are re-compiling a lot of files that haven't changed you could see speedups with something like ccache. I don't think this wouldn't help in a normal development process if you're using 'make' etc. but bringing it up just in case.

Otherwise my guess would be that you don't have enough RAM and the system is swapping.

Hello:

Thanks for the info. I've actually started using ccache, but it's taking insane amounts of time to compile individual files. I know for sure it's not the ram, so I'm not sure where the issue is.

Also, the bonus to compiling on the vps is that's where the mud will be running. If I compile in a vm on my own system I need to configure everything with 64-bit libraries just as it is on the Linode, otherwise shared linkage will not be portable. I just do all the work there rather than on a system here since I bounce between multiple boxes.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct