Skip to content

Do not autoload plugin option#36

Merged
aristath merged 1 commit into
developfrom
ari/do-no-autoload-plugin-option
May 5, 2025
Merged

Do not autoload plugin option#36
aristath merged 1 commit into
developfrom
ari/do-no-autoload-plugin-option

Conversation

@aristath

@aristath aristath commented May 5, 2025

Copy link
Copy Markdown
Member

Context

This PR changes ensures the plugin option is not autoloaded, to improve performance.

@github-actions

github-actions Bot commented May 5, 2025

Copy link
Copy Markdown

Test on Playground
Test this pull request on the Playground

@ilicfilip

Copy link
Copy Markdown
Collaborator

@aristath , this PR will set autoload to false for new installs and it will update the auto load value when existing users update the option?

Should we add an upgrade script to do it automatically when plugin is updated?
I was thinking something light, like we do it is done in Comment Experience

@aristath

aristath commented May 5, 2025

Copy link
Copy Markdown
Member Author

@aristath , this PR will set autoload to false for new installs and it will update the auto load value when existing users update the option?

Yes, that is correct.

Should we add an upgrade script to do it automatically when plugin is updated?

I don't think that's necessary... The option gets updated in Plugin::update_tracked_options(), which is hooked in shutdown (in Plugin::register_hooks()), so it will be auto-updated after the 1st page-load anyway

@aristath aristath merged commit 825f0ef into develop May 5, 2025
8 checks passed
@aristath aristath deleted the ari/do-no-autoload-plugin-option branch May 5, 2025 08:39
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.

2 participants