Why does a simple code work very long for me and others normally

Alex 0 Reputation points
2023-07-14T20:49:40.5733333+00:00

Hi I have visual studio 2022, max updated, I have a problem I compile the code takes from 5 to 10 seconds in C++, the code is very simple hello world, why so long, if the second time to run then it is instantaneous but if you change hello world to hello world2 then again 5-10 seconds CPU is not loaded that I in the settings natikal or what prrblomom
This text is output in visual studio console or I don't know how to call it correctly Assembly started...

1>------ Build started: Project: Project3, Configuration: Debug x64 ------

1>FileName.cpp

1>Project3.vcxproj -> C:\Users\User\source\reposition\Project3\x64\Debug\Project3.exe

========== Build: successfully completed - 1 , failed - 0, up to date - 0, skipped - 0 ==========

========== Build started at 11:47 PM, took 00,970 s ==========

Windows for business | Windows Client for IT Pros | User experience | Other
Developer technologies | C++
Developer technologies | Visual Studio | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2023-07-17T04:56:34.2366667+00:00

    Hi @Alex, 

    Welcome to Microsoft Q&A! 

    Please disable or uninstall the installed extensions under Extensions > Manage Extensions > Installed.

    Meanwhile, go to Tools > Options > Environment > General > uncheck Automatically adjust visual experience based on client performance and Use hardware graphics acceleration if available. 

    Then, you can build again and check if the time is shorter. 

    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.