Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The project manager was reloading all files and formatting their icons every time it started or any change was made to the list. So when you have 100 projects, it takes a long time and causes lag, especially when the OS didn't cache those files yet.
This PR loads files once on startup, and further operations are done on information which is already loaded instead. This makes sorting, fav'ing, filtering much faster.
Also, icons are now loaded iteratively in a coroutine, which allows a faster start time.
In order to accomplish this, I refactored the project list to have its own class. Structuring it more explicitely made my work easier and I believe it's easier to understand what the code aims to do now, which may help for future changes.
I also changed this icon:

Closes #26233
Note 1:
the way we save registered projects and their favorite status complicates things a bit.
They are mixed with other editor settings and it looks like this:
I would like to change it to be a simple dictionary like this:
And eventually move those to their own file. However it would break compatibility, unless some migration code is added. It's not hard to do, but I preferred to not do it in this PR as it's just improvements, not features.
Note 2:
The .cpp diff is hard to read, so I'd suggest to just focus on lines from 925 to 2576, which is where I did the changes. Some of the code remained the same, just moved elsewhere.