[Plugin: WordPress.com Stats] Potential Performance improvement
I’m in the process of making performance improvements to our WordPress installation, and this plugin appears to balloon the number of performed queries per page.
On a single home page load, it appears to perform a query for each statistic being tracked. For us that means 82 extra queries per page load, none of which are done via ajax. While I haven’t tracked down what is doing this, it’s likely a simple loop that is retrieving every possible option for the plugin.
This could be replaced with a single query like so:
SELECT blog_id, option_id, option_name, option_value, autoload FROM options WHERE option_name LIKE 'wpsd_%'
In the constructor of whatever class – there is an entry point for the stats plugin, right? – requires these options. If you REALLY want to, you could do
wpsd_option_%instead, which would restrict it to just the options for the plugin.
I’ve disabled the plugin in the meantime, and this might be a localized issue, but just wanted to throw this out there so others were aware/can fix the issue.
- The topic ‘[Plugin: WordPress.com Stats] Potential Performance improvement’ is closed to new replies.