472,950 Members | 2,555 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Program compiled in Visual Studio 2005 runs slower than VS 6

Hi experts,

We are trying to migrate from Visual Studio 6 (C++ project) on Windows 2000
to Visual Studio 2005 SP1 on Windows Vista but found that the migrated
program runs slower in both OS.
A looping section of the original program (compiled with VC6) running in
Windows 2000 takes 400ms but the same program (compiled with VS 2005) in
Windows Vista but copied to the Windows 2000 machine (together with the VC
Redistribution libraries) to run takes 3000ms.
I believe there are other postings related to the degradation in performance
for programs compiled in Visual Studio 2005 compared to those in Studio 2003
or Studio 6.
Are there any patches released to solve the performance issues reported in
Visual Studio 2005 ? If there aren't at the moment, will there be a patch to
solve this issue in future ?
Thank you in advance.

Jun 27 '08 #1
4 2480
Try build your program in Release mode with _SECURE_SCL defined to 0 (=
disabled). Put the #define _SECURE_SCL 0 *before* inlcuding other header
files.

A good place would be the top of StdAfx.h

// Disable _SECURE_SCL in release builds
#ifndef _DEBUG
#define _SECURE_SCL 0
#endif
HTH,
Giovanni
"CR Support" <CR*******@discussions.microsoft.comha scritto nel messaggio
news:F2**********************************@microsof t.com...
Hi experts,

We are trying to migrate from Visual Studio 6 (C++ project) on Windows
2000
to Visual Studio 2005 SP1 on Windows Vista but found that the migrated
program runs slower in both OS.
A looping section of the original program (compiled with VC6) running in
Windows 2000 takes 400ms but the same program (compiled with VS 2005) in
Windows Vista but copied to the Windows 2000 machine (together with the VC
Redistribution libraries) to run takes 3000ms.
I believe there are other postings related to the degradation in
performance
for programs compiled in Visual Studio 2005 compared to those in Studio
2003
or Studio 6.
Are there any patches released to solve the performance issues reported in
Visual Studio 2005 ? If there aren't at the moment, will there be a patch
to
solve this issue in future ?
Thank you in advance.

Jun 27 '08 #2
Hi CR,
We are trying to migrate from Visual Studio 6 (C++ project) on
Windows 2000 to Visual Studio 2005 SP1 on Windows Vista but found
that the migrated program runs slower in both OS.
A looping section of the original program (compiled with VC6) running
in Windows 2000 takes 400ms but the same program (compiled with VS
2005) in Windows Vista but copied to the Windows 2000 machine
(together with the VC Redistribution libraries) to run takes 3000ms.
I believe there are other postings related to the degradation in
performance for programs compiled in Visual Studio 2005 compared to
those in Studio 2003 or Studio 6.
Are there any patches released to solve the performance issues
reported in Visual Studio 2005 ? If there aren't at the moment, will
there be a patch to solve this issue in future ?
Are use using STL iterators?
Disable debug and checked iterators:

http://msdn.microsoft.com/en-us/libr...65(VS.80).aspx
http://msdn.microsoft.com/en-us/libr...82(VS.80).aspx

--
SvenC
Jun 27 '08 #3
Thanks for your reply, Giovanni. I tried adding the _SECURE_SCL=0 in the
Preprocessor Definitions section of the compiler but the speed didn't improve.
By the way, the looping section of the codes does not use STL. Just memcpy
and _stricmp.

I noticed some other posts suggesting "#pragma function" for VS2005. I
managed to try it and it works. As _stricmp does not have intrinsic function,
I just have the memcpy listed in the pragma directive and the loop goes back
to about 400ms instead of 3000.

I will try _SECURE_SCL=0 for the other sections that uses STL.
Thanks for the suggestion.

CR Support

"Giovanni Dicanio" wrote:
Try build your program in Release mode with _SECURE_SCL defined to 0 (=
disabled). Put the #define _SECURE_SCL 0 *before* inlcuding other header
files.

A good place would be the top of StdAfx.h

// Disable _SECURE_SCL in release builds
#ifndef _DEBUG
#define _SECURE_SCL 0
#endif
HTH,
Giovanni

Jul 1 '08 #4
Thanks for your reply, SvenC. I tried adding the _SECURE_SCL=0 in the
Preprocessor Definitions section of the compiler but the speed didn't improve.
By the way, the looping section of the codes does not use STL. Just memcpy
and _stricmp.

I noticed some other posts suggesting "#pragma function" for VS2005. I
managed to try it and it works. As _stricmp does not have intrinsic function,
I just have the memcpy listed in the pragma directive and the loop goes back
to about 400ms instead of 3000.

I will try _SECURE_SCL=0 for the other sections that uses STL.
Thanks for the suggestion.

CR Support
"SvenC" wrote:
>
Are use using STL iterators?
Disable debug and checked iterators:

http://msdn.microsoft.com/en-us/libr...65(VS.80).aspx
http://msdn.microsoft.com/en-us/libr...82(VS.80).aspx

--
SvenC
Jul 1 '08 #5

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

Similar topics

0
by: Massimiliano Polito | last post by:
It seems the option '/useenv' is no longer supported in in Microsoft Visual .NET 2005. If I run 'devenv /?' I get the following: ------------------------ Microsoft (R) Visual Studio Version...
13
by: Mark Rae | last post by:
Hi, On Friday I attended the Microsoft EVO conference in London where they talked about Vista, Office 2007 and Exchange 2007 and how they all work together beautifully, how they were all...
14
by: Ben Voigt | last post by:
Under certain circumstances I get: First-chance exception at 0x7c812a5b (kernel32.dll) in LTMGUI.exe: 0xC0020001: The string binding is invalid. First-chance exception at 0x7c812a5b (kernel32.dll)...
9
by: eclipsme | last post by:
Is it possible to take a VB program and run it from the Web? Any pointers/help would be very appreciated! Thanks, Harvey
10
by: Nicholas Zhou | last post by:
Sorry if this sounds stupid. I am a total newbie.... Can I compile C program in Visual Studio 2005 IDE? I wrote the simple "Hello World" program in it: ------------------------------------ ...
25
by: Marco | last post by:
Hi everyone. I've been trying to move some small applications written in vb.net 2003 to vb.net 2005 express just for testing purposes. I have noticed so far that the applications seem to run ...
16
by: Jon Davis | last post by:
We ordered new systems with fast hardware and great specs, but Visual Studio takes longer to build a project than on the old workstation. Msbuild is faster, csc.exe is faster, file copy is faster....
11
by: =?Utf-8?B?S3VlaXNoaW9uZyBUdQ==?= | last post by:
I am running Visual studio 2003 with framework 1.1 on a vista platform. However it runs very slow in debug mode, especially while it is loading dlls. What is the problem? Is there a compatibility...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

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.