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

Cache script icons in editor #60789

Merged
merged 1 commit into from
May 5, 2022
Merged

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented May 5, 2022

Fixes #60127

This ensures that each script is parsed only once in search of the icon when updating scene tree. It makes loading scenes and especially editing much faster. It introduces a small issue that when you change script icon, it won't properly refresh until cache is cleared (right now it's cleared when any scene is closed). But this is a very minor issue compared to what this fixes.

I originally made this PR for 3.x branch, I couldn't reproduce the issue in master, as I don't have a "complex" enough 4.0 project. But I at least tested that it doesn't break anything.

Here's the original 3.x patch for easier cherry-picking: 0001-Cache-script-icons-in-editor.patch.txt

@KoBeWi KoBeWi added enhancement topic:editor usability cherrypick:3.x Considered for cherry-picking into a future 3.x release performance labels May 5, 2022
@KoBeWi KoBeWi added this to the 4.0 milestone May 5, 2022
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Looks great!

@akien-mga akien-mga merged commit 7a30317 into godotengine:master May 5, 2022
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 3.5.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label May 5, 2022
@KoBeWi KoBeWi deleted the gotta_edit_fast branch May 5, 2022 13:29
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.

Scene editing is slow in complex projects
2 participants