How long should variable renaming take in Visual Studio 2019/2022?

test code 21 Reputation points
2025-09-04T07:23:09.5266667+00:00

I’m working on a fairly large Visual Basic project in Visual Studio 2019/2022 (about 600 MB in size). When renaming variables, the process is extremely slow. Previously, a single rename could take over 7 minutes, and sometimes the IDE would even freeze or crash.

After some troubleshooting, I went to:

Tools → Options → Text Editor → Visual Basic → Advanced

and disabled the following options:

Enable Razor Pull Diagnostics

Enable Pull Diagnostics
image

With these changes, the performance improved significantly. The same rename operation now completes in about seconds.

For context:

The variable I renamed had 200+ references across multiple files in the solution.

On a similar project in Visual Studio 2010, the same rename takes only around 5 seconds.

My question:

Is 30 seconds a reasonable time for renaming a variable in a project of this size in VS 2019/2022, or should I expect it to be faster with proper configuration or hardware?

Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other
A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Leon Tran (WICLOUD CORPORATION) 350 Reputation points Microsoft External Staff
    2025-09-11T08:29:06.79+00:00

    Hi @test code , thank you for sending us your question. I would like to provide some information related to the root issue of low performance in renaming variables.

    In Visual Studio 2019 and 2022, it has integrated the Roslyn compiler for code analysis, IntelliSense, and refactoring. It offers some benefits but also consumes more hardware resources to run. You can see that the performance increases when you turn off "Enable pull diagnostics" and "Enable Razor pull diagnostics."

    On the other hand, Visual Studio 2010 doesn't integrate this, so the performance isn’t affected.

    For your question, we don't have your hardware specs to provide a detailed answer, but under 30 seconds is a reasonable time for renaming a variable with over 200 references. However, you can reduce the time by using a newer CPU, increasing the RAM, and making sure you're using an SSD drive.

    I recommend using Task Manager to track resource usage and see the pressure on memory and CPU. This will help you make a better decision if you need to upgrade or not.

    I hope this helps you get things back on track quickly! If my suggestions can solve your issue, feel free to interact with the system accordingly!


0 additional answers

Sort by: Most helpful

Your answer

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