Jump to content

PCH for rAthena - Compilation sucks


MathReaper

Recommended Posts


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  57
  • Reputation:   14
  • Joined:  09/01/18
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  477
  • Reputation:   269
  • Joined:  06/13/17
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  57
  • Reputation:   14
  • Joined:  09/01/18
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  477
  • Reputation:   269
  • Joined:  06/13/17
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  57
  • Reputation:   14
  • Joined:  09/01/18
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  477
  • Reputation:   269
  • Joined:  06/13/17
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  99
  • Topics Per Day:  0.02
  • Content Count:  623
  • Reputation:   94
  • Joined:  05/11/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  57
  • Reputation:   14
  • Joined:  09/01/18
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  1096
  • Reputation:   344
  • Joined:  02/26/12
  • Last Seen:  

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. 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...