By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,825 Members | 1,258 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,825 IT Pros & Developers. It's quick & easy.

Program compiled in Visual Studio 2005 runs slower than VS 6

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.