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: Avoid creating unnecessary theme objects for precompiled checks #1162

Merged
merged 8 commits into from
Jan 14, 2025

Conversation

gadenbuie
Copy link
Member

Before this PR, we'd unconditionally create a bs_theme() object for each of the precompiled themes on package load, even if precompiled theme use is disabled.

After this PR, we create the base bs_theme() only once when it's needed and then store a hash of the theme rather than the complete theme object. As a result, we now compare hashes of the theme objects instead of calling identical(). We also avoid the entire precompiled theme path if its not required.

Base automatically changed from fix/precompiled-ignore-brand to main January 9, 2025 17:55
@gadenbuie gadenbuie merged commit 897dcb5 into main Jan 14, 2025
13 checks passed
@gadenbuie gadenbuie deleted the refactor/precompiled-comparisons branch January 14, 2025 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant