Load project metadata file only when needed - #79785
Merged
Merged
Conversation
bitsawer
reviewed
Jul 22, 2023
Member
Author
|
Ok I removed the modified time checks. Now the metadata is loaded only once, so you can't modify it externally while the editor is running. |
YuriSizov
reviewed
Nov 9, 2023
YuriSizov
approved these changes
Nov 9, 2023
YuriSizov
left a comment
Contributor
There was a problem hiding this comment.
This will cache the file, so any changes to it will require an editor restart. But this should be fine. Let's just wait for 4.3 just in case, and probably cherry-pick it afterwards.
Member
Author
Only external changes and this file is not edited externally, because it's in a folder that's usually ignored. |
Contributor
|
Thanks! |
Contributor
|
Cherry-picked for 4.2.2. |
BendyLand
pushed a commit
to BendyLand/voltaire
that referenced
this pull request
Aug 2, 2026
Load project metadata file only when needed
BendyLand
pushed a commit
to BendyLand/voltaire
that referenced
this pull request
Aug 2, 2026
Load project metadata file only when needed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Every single time when
get_project_metadata()orset_project_metadata()is used, the ConfigFile will be loaded again. These functions are used quite a lot in the editor, so it causes many wasteful I/O operations.This PR ensures that the file is loaded only when needed, i.e. once at launch and in case of external modification (this is sometimes needed for testing).