You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have a large Winforms project with about 500 DI classes. When I save files, Visual Studio stuck on (for 50-500s):
In VS 2022 (17.5.1) I have enabled Options -> Text Editor -> Codde Cleanup -> Run Code Cleanup profile on Save. In profile, I have only: Remove unnecessary Imports.
Using the second VS instance I attached it to the first VS instance and dump active Tasks:
It looks like, Pure.DI unnecessarily runs during CodeCleanup. When I uninstall Pure.DI Code Cleanup runs very fast.
PureDI logs show only: WRN Tracer: The path is empty.
How can I help you solve this problem? I was able to successfully migrate my entire project to PureDI. Unfortunately, with such performance in VS it is impossible to work ...
The text was updated successfully, but these errors were encountered:
michalciolek
changed the title
Code Cleanup with Pure.DI - performance issue
Saving files with Code Cleanup with Pure.DI - performance issue
Mar 3, 2023
Sorry I haven't used VS for years (I used Rider) and can't reproduce this problem right now for some huge solution. I'll try to find a workaround when I reproduce it. Could you clean up the solution and rebuild it from scratch in VS. How long does it take with and without Pure.DI?
What happens when you disable automatic cleanup and do it manually?
The latest C# code generators support an incremental API, and Pure.DI will use this API in v2.
By the way, this stack is related to the use of factories, perhaps Pure.DI has some inefficient code for this case. I'll try to look in that direction.
Hello, I have a large Winforms project with about 500 DI classes. When I save files, Visual Studio stuck on (for 50-500s):
![pure00](https://user-images.githubusercontent.com/4482555/222721180-5b8b8d96-c979-401b-a79a-11b1b4fe329a.png)
In VS 2022 (17.5.1) I have enabled
Options -> Text Editor -> Codde Cleanup -> Run Code Cleanup profile on Save
. In profile, I have only:Remove unnecessary Imports
.Using the second VS instance I attached it to the first VS instance and dump active Tasks:
![pure01](https://user-images.githubusercontent.com/4482555/222721868-0523df8c-d8f5-484d-b0c7-c24f21edd2b3.png)
It looks like, Pure.DI unnecessarily runs during CodeCleanup. When I uninstall Pure.DI Code Cleanup runs very fast.
PureDI logs show only:
WRN Tracer: The path is empty
.How can I help you solve this problem? I was able to successfully migrate my entire project to PureDI. Unfortunately, with such performance in VS it is impossible to work ...
The text was updated successfully, but these errors were encountered: