Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable profiler code by default, enable it with a compile-time option #2939

Closed
Calinou opened this issue Jul 20, 2015 · 8 comments
Closed
Labels
@ Build CMake, build scripts, official builds, compiler and linker errors Feature request Issues that request the addition or enhancement of a feature Performance Possible close

Comments

@Calinou
Copy link
Member

Calinou commented Jul 20, 2015

For increasing game performance, profiler should not be built by default. Perhaps -DENABLE_PROFILER=1 would help.

@nerzhul
Copy link
Member

nerzhul commented Jul 20, 2015

👍 agreed.
Here is an example commit to remove it (warn it remove a little bit more), for example to disable it add #ifdef ENABLE_PROFILER

nerzhul@0de7dbf

@est31
Copy link
Contributor

est31 commented Jul 21, 2015

The default for that option should be on for debug builds, and off for release builds.

@nerzhul
Copy link
Member

nerzhul commented Jul 21, 2015

👍 est31

@Zeno-
Copy link
Contributor

Zeno- commented Jul 21, 2015

Is this really going to make a performance difference?

@nerzhul
Copy link
Member

nerzhul commented Jul 21, 2015

@Zeno- it's a minimal gain, and profiler shouldn't be enabled in production releases, debugging code shouldn't have to be present in production

@est31 est31 added the Feature request Issues that request the addition or enhancement of a feature label Jul 21, 2015
@paramat
Copy link
Contributor

paramat commented Sep 14, 2017

Anyone interested in coding this sometime?

@nerzhul
Copy link
Member

nerzhul commented Sep 14, 2017

let this open, i may code it

@erlehmann
Copy link
Contributor

profiler shouldn't be enabled in production releases, debugging code shouldn't have to be present in production

@nerzhul can you guarantee that this has no negative effects for mod developers?

@Zughy Zughy added @ Build CMake, build scripts, official builds, compiler and linker errors Performance labels May 2, 2022
@Zughy Zughy closed this as completed Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Build CMake, build scripts, official builds, compiler and linker errors Feature request Issues that request the addition or enhancement of a feature Performance Possible close
Projects
None yet
Development

No branches or pull requests

8 participants