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

Refactor how file cache entries are stored #89301

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Mar 8, 2024

Currently the code for writing FileSystem cache is basically a one unreadable line of string additions, followed by a loop of string additions. This PR changes it to be much more readable, without affecting the file's content. It might also make the code faster.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Mar 8, 2024
}

p_file->store_line(s);
PackedStringArray cache_string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StringBuilder isn't appropriate for this, is it? Code is sooo much more readable now, but just putting the thought out there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used PackedStringArray for easier joining.

@akien-mga akien-mga merged commit bfa866c into godotengine:master Mar 8, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@KoBeWi KoBeWi deleted the human_readable_code branch March 9, 2024 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants