Author Topic: MSVC suddenly insanely SLOW!  (Read 1100 times)

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1431
    • View Profile
Re: MSVC suddenly insanely SLOW!
« Reply #15 on: February 24, 2022, 05:06:15 PM »
Here's an update for anyone who might be curious.

Yesterday, MS Visual C++ 2015 started working correctly again.

The 34 CPP demos from the BCX Help File each compile in 2 to 3 seconds.

Compiling BCX (3 times) takes a total of 24 seconds.

I have -NO- idea what the latest Microsoft updates did to my PC but I'm happy again. 

Sort of ....

jbk

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
Re: MSVC suddenly insanely SLOW!
« Reply #16 on: February 24, 2022, 06:06:55 PM »
MrBcx, while it was slow, did you check with task manager what process was eating up the CPU time?

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1431
    • View Profile
Re: MSVC suddenly insanely SLOW!
« Reply #17 on: February 24, 2022, 06:46:14 PM »
Yes ... but nothing exceeded 1% -2%, so that road took me nowhere.

Testing MSVC-2022 now - it takes 75 seconds to compile BCX 3 times.

That is three times slower than MSVC 2015

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1431
    • View Profile
Re: MSVC suddenly insanely SLOW!
« Reply #18 on: February 24, 2022, 07:40:16 PM »
Yes ... but nothing exceeded 1% -2%, so that road took me nowhere.

Testing MSVC-2022 now - it takes 75 seconds to compile BCX 3 times.

That is three times slower than MSVC 2015

If I change /O2 to /O1 in MSVC2022, compiling speeds up considerably,
almost as fast as MSVC2015 which is also set at /O1.  Quite tolerable now.

jbk

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
Re: MSVC suddenly insanely SLOW!
« Reply #19 on: February 24, 2022, 08:16:51 PM »
MSVC-2022 is still in beta I think, looks like it needs more work.

Robert

  • Hero Member
  • *****
  • Posts: 966
    • View Profile
Re: MSVC suddenly insanely SLOW!
« Reply #20 on: February 24, 2022, 08:34:24 PM »
MSVC-2022 is still in beta I think, looks like it needs more work.

Not beta, released November 8, 2021

https://devblogs.microsoft.com/visualstudio/visual-studio-2022-now-available/

Several, six to be exact, updates since.

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1431
    • View Profile
Re: MSVC suddenly insanely SLOW!
« Reply #21 on: February 24, 2022, 08:35:25 PM »
Visual Studio 2022 version 17.2 Preview Release  02/22/2022

It's getting very close to RTM.

jcfuller

  • Sr. Member
  • ****
  • Posts: 380
    • View Profile
Re: MSVC suddenly insanely SLOW!
« Reply #22 on: February 25, 2022, 03:08:50 PM »
I don't think I want a preview.
A couple times a week I check for updates with Windows start->menu->Visual Studio Installer.
I never clicked on the Available Tab until today.
I don't want the IDE and I don't think you can get just the build tools with the 7.2 preview
For just the 7.1 build tools
https://visualstudio.microsoft.com/downloads/
bottom of page
Tools for Visual Studio 2022
Build Tools for Visual Studio 2022

James

Bey

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: MSVC suddenly insanely SLOW!
« Reply #23 on: October 11, 2022, 09:09:57 AM »
Fine here:
VS -> 17.0.6
CL -> 19.30.30709

I do have an issue with /std:c++20.
Former warnings are now errors I believe.
the default is std:c++14
/std:c++17 seems to be ok. Not tested on everything
James

Yes, errors. Microsoft std:c++20 has promoted this

DIM AS CHAR PTR LitStr = "String Literal"

to error
error C2440: 'initializing': cannot convert from 'const char [15]' to 'char *'

According to rumor, this particular item destroyed collaboration between the C and C++ standards negotiators.

I know that it destroyed my ambition to purify BCX of C++ warnings, an ambition I believe that you had as well, James.

This thread is a bit old but the "fix" may be useful for those that may continue to encounter this.

Your error: "error C2440: 'initializing': cannot convert from 'const char [15]' to 'char *'" can be fixed by two different methods.

First, you can precede the string with (char*).
Second, and the better choice, set the compiler options as "Compile as C Code (/TC)".
This is found in your Visual C++ menu under "Project > Properties"... then select "C/C++ > Advanced"... Select "Compile As" and
change "default" to "Compile as C Code (/TC)" and this error will no longer appear.