-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Optimisation consistency #1022
Comments
this is a big topic.. i'd suggest making debug the default option, but with O2 optimisations. i rarely notice the O2 debug setting when doing most debugging, and if i really need it i can set it back to O0 by hand (i figure anyone who knows how to use a debugger knows how to do this anyway!) |
@DamianNZ - that is the current default in osx we could also consider oF code debug at /O2 but users project at /O0 |
oF code debug at O2 and user's project at O0 sounds good to me, just as long as the users know that they can make it faster if they choose to. i'd still steer clear of defaulting to O0 on Xcode. perhaps consistency isn't as big a problem as you're suggesting, since GCC's optimiser works differently to VC's anyway. |
i would also suggest avoiding O0 as a default. which one of these are you more likely to hear?
it is strange that VS acts so different in O2. |
yep. |
@elliotwoods agreed! |
i'm not 100%, but am pretty sure that /O1 also blocks debugging |
I would vote for using /O0 with Debug mode and perhaps use Release by default. |
yes. |
I agree with colormotor. More than actively trying to debug him/herself, a novice will quite likely get crashes. With the optimizations enabled by default, it will be even even more difficult to find out where / why the program crashed. |
update : sorry for missing this before |
re-igniting this thread. in xcode the default for the debug openframeworks project is Os which makes it undebuggable - and it's a shared project obviously, so you can't change it per project. To have optimizations which prevent debugging in a debug build I find a bit crazy to be honest! If people don't want to debug and prefer performance, they should run in release mode! that's what's for! |
Re-igniting this @memo was this an issue with OS X project or iOS. I've just made changes to fix the iOS side. I'll have a look at the OSX settings as well... |
Continuation of http://forum.openframeworks.cc/index.php/topic,9095.msg42378.html#new
NOTE: Things may have changed as the projects I'm using are all created using the older creation tools.
Can somebody up to date please check?
Currently XCode's default project setting is /O2 for debug projects
whilst Visual Studio's is /O0
/O0 generally makes the most sense for debug mode as it allows for effective program flow and variable tracking (because with /O2, lines of code and variables are commonly optimised away).
If we are worried that this will leave default users in a default 'slower state' then perhaps we could make release the default? Then people could be aware that they are selecting debug when they want to actually do some debugging?
But this may have other issues (such as some libraries might not perform as many checks as otherwise?)
it might be worth making users more aware of the 2 options anyway, and then start using them consistently
The text was updated successfully, but these errors were encountered: