orangelabweb / imagemagick-engine

WordPress plugin to replace image engine with ImageMagick.
https://wordpress.org/plugins/imagemagick-engine/
9 stars 9 forks source link

add_option [OPTIMIZATION] #28

Closed hkodavid closed 2 years ago

hkodavid commented 3 years ago

Hello,

I suggest a "minimal" optimization. Use the add_option with autoload yes to avoid one query in every request. WP has tons of these bad solution and has 50+ unnecessary queries by every request...

rickardw commented 2 years ago

Thank you for you suggestion. "Autoload" however loads the options on every WP page and that is not necessary. We use a global variable so per request the options are only loaded once from the database. So not 50+ queries for this plugin.