Jump to content

Is there a way to Compile Game faster?


Recommended Posts

The time that require the compilation depend on the performance of your computer.. so if you don't have a good computer you can't do much.
Anyway, if you clean always the project (with gmake clean) is normal.. When you compile do this:

gmake -j20

or simple

gmake

and not this:

gmake clean
gmake -j20

because if you run gmake clean the compiler delete all compiled files (objects).

 

And this is also valid for the database.

  • Love 1
Link to comment
Share on other sites

The time that require the compilation depend on the performance of your computer.. so if you don't have a good computer you can't do much.

Anyway, if you clean always the project (with gmake clean) is normal.. When you compile do this:

gmake -j20

or simple

gmake

and not this:

gmake clean
gmake -j20

because if you run gmake clean the compiler delete all compiled files (objects).

 

And this is also valid for the database.

gmake -j20

This command is only mean escape all errors and you can't see actual error. Is always the best way gmake because when gmake is see the error, system stopped and you can see actual error.

 

Kind Regards

Zerelth ~ Ellie

  • Love 1

Do not be sorry, be better.

Link to comment
Share on other sites

Wrong²²²²

 

You can speed up compilation. But it's not that easy. Do you even know what -j20 means? It's an optimization for you if you have more threads from your cpu. You can let gcc compile more cpp-files simultaneously.

You'd never just make -j20 because you feel like doing it. Normally you'd calculate the value for yourself. -jx, where x = number of cpu threads * 1.5 at physical hdd's but you can play with it a little bit. It's just for you to use different values and check how much time passes. -j20 makes no sense. Neither do you have that many threads nor would a normal hdd (ssd could possibly do it) handle it.

 

Additionally, the compiler caches it's tasks into your memory. The more memory you can serve, the faster it can compile your project.

Play with compiler flags. Use ccache, that'll also speed it up.

Always benchmark how fast your compiler does the job. Optimizing it isn't just copy-pasta everything from everywhere, it's more like playing with it and testing how everything affects your compiling time.

 

Also newer versions of gcc/clang are much faster. Feel free to try it out.

  • Good 1
  • Love 1

what would you do in a battle of survival?

It's coming soon

Link to comment
Share on other sites

  • 3 months later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.