question

rain-5713 avatar image
0 Votes"
rain-5713 asked rain-5713 commented

Visual Studio compiles 7 min 40 sec, command line compiles 1 min 56 sec.

Hi!

How can I make visual studio compile faster? It compiles the same project 7 min and 40 sec while command line compiles it 1 min and 56 sec.

Command line that I use:
msbuild openrct2.proj /t:build /p:platform=x64 /p:configuration=Debug

If I compile it from command line it uses 100% CPU all the time. If compile it from Visual Studio then it uses 100% CPU at the beginning and then it drops to 12%. I have 6 cores and 12 logical processors. What do I need to do to make Visual Studio also use 100% cpu like command line does?

c++vs-msbuild
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AnnaXiu-MSFT avatar image
0 Votes"
AnnaXiu-MSFT answered rain-5713 commented

Hi @rain-5713 ,

Welcome to Microsoft Q&A!

Which version of Visual Studio are you using?

Please try to update your VS to the latest version and check if it is improved.

Besides, many components and extensions installed in Visual Studio may increase loading time.
You can disable the installed extensions that you do not use under Extensions > Manage Extensions > Installed.

Meanwhile, please clear the Visual Studio components cache folder. It is located at %localappdata%\Microsoft\VisualStudio\1X.0_xxxx\ComponentModelCache.
And delete the hidden .vs, bin and obj folders in the project folder.

Sincerely,
Anna


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.







· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Updating my VS 2022 from 17.1.0 Preview 4.0 to 17.3.0 Preview 1.0 seem to have helped.

0 Votes 0 ·
rain-5713 avatar image
0 Votes"
rain-5713 answered

I have VS 2022.

Updating from 17.1.0 Preview 4.0 to 17.3.0 Preview 1.0 seem to have helped.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.