473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Optimizing



Hi,
I have an app that compiles and works fine in Debug mode. However, when
I try it in Release, it compiles fine but does not run correctly. I am
thinking that it is an optimization problem.
I have not been able to figure out how to deal with that in .NET 2003.
Anyone know how and if it is possible to reduce or turn off
optimizations?

Thanks
Jeff
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #1
5 1552
Hi,

Right-click on the project in Solution Explorer and choose 'Properties'.
Depending on what language you're using you'll find the optimization
settings somewhere within (for example, C++ has settings under the compiler
options and the linker options. Your best bet is probably turning things off
one by one. If you've altered the settings in the Debug build, they won't
automatically become part of the Release build, so it's worth checking that
any important settings (for example, RTTI in C++) have been migrated to the
other build targets. Good luck!

Steve

"Jeff Collett" <jc******@oshtruck.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...


Hi,
I have an app that compiles and works fine in Debug mode. However, when
I try it in Release, it compiles fine but does not run correctly. I am
thinking that it is an optimization problem.
I have not been able to figure out how to deal with that in .NET 2003.
Anyone know how and if it is possible to reduce or turn off
optimizations?

Thanks
Jeff
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 21 '05 #2
Jeff Collett <jc******@oshtruck.com> wrote:
I have an app that compiles and works fine in Debug mode. However, when
I try it in Release, it compiles fine but does not run correctly. I am
thinking that it is an optimization problem.
I have not been able to figure out how to deal with that in .NET 2003.
Anyone know how and if it is possible to reduce or turn off
optimizations?


It's more likely that it's a problem in your code which just happens
not to show up when running in the debugger. Various things
(particularly involving threading) can do this. In what way does your
app not run correctly in release mode?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #3
I have an application that does serial communication and then displays a
list of items based on what was returned on the serial port. The List
will not display in release.
When I go to check the optimization, under C/C++/ Optimization, most of
the choices there are dimmed out.
The bottom 3 can be changed, current settings are
Enable Fiber-Safe Optimizations No
Optimize For Processor Blended
Optimize For Windows Application No

Other than those three I cannot change anything.

I am also going through the code to see if there could be something
else.

Thanks


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #4
Do you have VS Professional or VC++ Standard Ed? The standard edition
doesn't come with the optimising compiler (GRRR!) which may be why these
options are greyed out. It should print out which compiler version you're
using at the top of the build log. If it's not being optimised, find out
exactly which settings (both compiler and linker) are different between the
two builds.

Other than that, like Jon said, threading can become a big problem in
release builds, and this might apply to serial comms. You might consider
building a debuggable release build. Have a look at
http://www.cygnus-software.com/paper...debugging.html and there's
also something on MSDN about it but I can't find it.

Steve

"Jeff Collett" <jc******@oshtruck.com> wrote in message
news:Oa**************@tk2msftngp13.phx.gbl...
I have an application that does serial communication and then displays a
list of items based on what was returned on the serial port. The List
will not display in release.
When I go to check the optimization, under C/C++/ Optimization, most of
the choices there are dimmed out.
The bottom 3 can be changed, current settings are
Enable Fiber-Safe Optimizations No
Optimize For Processor Blended
Optimize For Windows Application No

Other than those three I cannot change anything.

I am also going through the code to see if there could be something
else.

Thanks


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 21 '05 #5

Hi,
It is the Standard version. I will look over that article, maybe that
will help. A lack of being able to use breakpoints does make it a bit
difficult to track down.

Thanks
Jeff
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Andreas Paasch | last post by:
I've finally gotten my nice little system working and it's gone live. Now, I spent time optimizing my code and adding a little smart functionality here and there, based on needs and simplicity. ...
6
by: A Future Computer Scientist | last post by:
A question: Is it really important to think about optimizing the native code or optimizing it for P Code? Or does the code you write make a difference?
4
by: J. Campbell | last post by:
From reading this forum, it is my understanding that C++ doesn't require the compiler to keep code that does not manifest itself in any way to the user. For example, in the following: { for(int...
32
by: Bob | last post by:
Can anyone point me to a place where I can obtain the Microsoft C/C++ Optimizing Compiler Version 7.00. It was distributed about 10 years ago on floppy diskettes. I had a valid license but...
2
by: Brian | last post by:
In particular, this question goes out to the Microsoft C++ development team. Back in June, Ronald Laeremans posted the following message. Has the optimizing compiler been included with the...
4
by: Flashman | last post by:
A little confusing with setting up optimizing options with 2003 .NET. Under the Optimization Tab. if you set to /O1 or /O2 is the program ignoring the settings for Inline Function expansion,...
3
by: Nick Gilbert | last post by:
Hi, I have to send an array of prices for a list of products over XML. Currently my XML data looks like this: <ArrayOfProd> <Prod Code="productcode001"> <Prices> <P F="2005-01-01"...
24
by: Richard G. Riley | last post by:
Without resorting to asm chunks I'm working on a few small routines which manipulate bitmasks. I'm looking for any guidance on writing C in a manner which tilts the compilers hand in, if possible,...
6
by: peter_k | last post by:
Hi, Last time i'm interested in optimizing small c programs. On my studies we are sending the programs using the web interface to online judge. The person who will wrote the faster program get...
0
by: Miguel Perez | last post by:
Please critique this tail call optimizing decorator I've written. I've tried to fix the pitfalls of other proposed decorators, and the result is this one that supports mutual recursion, does not...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.