Jump to content
  • 0

Is there a way to Compile Game faster?


Benhero

Question

Hey Com,

 

My question is this:

Can i Compile the Game somehow faster?

Can i only Compile changed files and then Link Everything?

Or can i Jump over files thats does not net any update?

 

Hope you Unterstand!

 

Greatz Benhero

Link to comment

5 answers to this question

Recommended Posts

  • 0

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
  • 0

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
  • 0

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.

  • Love 1
  • Good 1

what would you do in a battle of survival?

It's coming soon

Link to comment

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


×
×
  • 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.