Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading/Unloading all strings from all resx-files in a large (??) solution causes the stuck of Visual Studio for a long time #638

Open
schicout opened this issue Mar 27, 2024 · 2 comments

Comments

@schicout
Copy link

Bug description

The initial state A solution consisting of 19 projects (500+ classes of UserControl with localization, 20000+ localizable strings) was opened and built.

Action

Loading all of 20k strings takes over a minute. And if you uncheck all checkboxes in resource tree panel, clearing the grid with a list of localizable strings will also take more than minutes.
When loading/unloading localizable strings from the data grid, the grid sometimes flickers, which may points to continuous repaint the grid after checking/unchecking a checkbox in resource tree panel on the left, or, even worse, after adding/removing each string from the grid.

Workstation

Intel Pentium Core i7-11700K on Z590 chipset / RAM 64G / SSD Samsung 980-Pro / NVIDIA GeForce RTX 3050 / Video - 4K.

Proposed solution

SuspendLayout/ResumeLayout may resolve the problem (?)

2024-03-28.01-23-04.mp4
@tom-englert
Copy link
Collaborator

Unfortunately there is nothing like SuspendLayout/ResumeLayout in WPF.

Can you profile it with your data set to see where the bottleneck is?

@schicout
Copy link
Author

schicout commented Apr 12, 2024

I apologize for not answering for a long time - I was stuck at work, I didn’t have time to finish the tests. But today, after updating the Visual Studio to version 17.9.6 and after updating .NET (KB5037336), everything started working much faster - the same 20k strings were opened in 5 seconds. I'll check on another workstation on Sunday, but I guess everything has worked itself out.

P.S. In general, I guess that the problem was not so much in the large number of resources in the solution, but in the number of resource files in the solution. I made two empty projects - in one I wrote down 300k localized strings in one file, in the second project I made 30 files with 10k strings each. In the first project, the ResX-manager read all strings in 11 seconds, and in the second, I waited 5 minutes, then I had to kill VS using task manager.
UPD. Yes, extension works correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants