[BUG] List of blocked domains is too large and saved in an option that is autoloaded which slows down your site
Hi all!
After importing the recommended settings a site becomes slow because the autoloaded options will grow with 2MB. I have had this kind of problem with other sites that stored to much of their data in an option.
To Reproduce Steps to reproduce the behavior:
- Go to MySQL and check the sizes of the
zero-spam-settingsoptions that is Autoloaded. - Go to Use Blocked Email Domains Recommendation and import recommendations
- Go to MySQL and check the size again. Mine grew by 2.1MB, yupp that's right 2.1MB extra on every load from the Database.
Expected behavior I expect this large of amount of data not te be autoloaded and to be saved in a separated table.
screenshots

After

Thanks for bringing this to our attention @jmslbam. This problem is a little more complex to fix, but do have plans to rework the settings system to avoid this. I'll leave this issue open until that has been done.
Thanks for the detailed report! I'm happy to verify that this issue has been addressed in the upcoming v5.5.8 release. We have refactored how the "Blocked Email Domains" list is stored to address the performance concern you raised:
-
Separated Storage: The blocked email domains list has been moved out of the main settings option and into its own dedicated option key (
zerospam_blocked_email_domains). -
Disabled Autoloading: We now explicitly set
autoload = 'no'for this specific option. This ensures that the large dataset (approx. 2MB) is not loaded into memory on every page load, but is only queried when specifically needed.
This should completely eliminate the database overhead you observed. Thanks again for helping us improve performance!