Sign in to follow this  
MathReaper

PCH for rAthena - Compilation sucks

Recommended Posts

Have you realized how long the rAthena needs to be compiled? It's really a long time. I'm surprised that a big project like rAthena doesn't have pre-compiled header (PCH) for speed up the compilation time.
My question is: Why? Why rAthena don't have PCH yet? Actually, it's needed at least 3 minutes to compile on my PC with MSVS2017 compiler and an avarage of 5 minutes to be compiled in a single core VM with G++ compiler.

So, I think we can include PCH to rAthena based on how much includes from STL we have (without counting those that will be included when the project start really looking like C++) and based that rAthena have a core shared for all the servers.

Well, that's just my opinion, comment your too.

Edited by MathReaper

Share this post


Link to post
Share on other sites

First compilation takes around 20 seconds only. after that it depends. mine compile around 2-5 seconds with few src edits. but yes, PCH have a very good impact.

Edited by Haruka Mayumi

Share this post


Link to post
Share on other sites
10 minutes ago, Haruka Mayumi said:

First compilation takes around 20 seconds only. after that it depends. mine compile around 2-5 seconds with few src edits.

Really? Interesting.

I have an Intel i7 8700k and it's quite expensive the compilation time here. I took 3 seconds to rebuild however.

Edited by MathReaper

Share this post


Link to post
Share on other sites
4 minutes ago, Haruka Mayumi said:

Yeah. well, just using MSbuild on bat file helps a lot. mine is 7th gen i7 only though.. 

True, but I have alot of mods on the src because I'm working on a C++ refactor, so, is more easy to me to just press F7. :v

But the point is, the more important are the GCC compilers that takes too much time to compile or clean-compile in low budget VM (at least in all my VM and Clouds take a really long time to complete).

  • Like 1

Share this post


Link to post
Share on other sites

Yea, it's really a problem when compiling on low budget VM's.. somehow it takes time for me too to compile there. more than 30 seconds or 1 minute?. So having PCH is really nice. But my opinion somehow is if they made one then that's good. but if not, we just compile on VM every once in a while since we test them on our pc anyway.

  • Upvote 1

Share this post


Link to post
Share on other sites

On m dedicated server: compile time 10s, using clean previous compilation.

Share this post


Link to post
Share on other sites
1 hour ago, Kakaroto said:

On m dedicated server: compile time 10s, using clean previous compilation.

Dedicated are really expensive, isn't it? I think this will improve compile time for low budget servers.

Share this post


Link to post
Share on other sites

How are you see a precompiled static headers in a dynamically developed project with around ~200k source code lines, which every single day changed several times per day?
Also, compilation never was an issue on VPS/Dedi servers. Never ever. It takes up to a few minutes maximum (first compilation), and few seconds or less if done just small source edit. If it took a longer time for you - try to change your VPS/Dedi server provider because they for sure oversell their CPU. 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this