Skip unnecessary updates to scene groups and scripts #91980
Merged
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.
Fixes #91418
Projects have
filesystem_update4
file that gets populated with paths to every scene/resource you have saved in your editor session. According to a comment, it's required to update dependencies when editor is restarted. I did not question that (but IMO it's sus), however it causes the project opening to be much slower the longer you were editing your project (as more files are saved and stored in that file).The problem was that this caused not only file rescan, but also update of scene groups in affected scenes, which is pointless. When a file gets updated from update4, it's safe to assume that non-dependency cache is up-to-date, because the file was already cached - we just force some FileSystem update. Thus my fix just skips unnecessary updates of files from update4 list. This includes scene group cache and script update.
I also fixed a bug where update4 file was not getting removed, which made the issue appear on every rescan. Also, apparently checking that file on every rescan is wrong, so I fixed it too.