[Plugin: Twitter Blackbird Pie] Plugin creates HUGE amount of unnecessary overhead
-
We’re using this plugin on a high traffic community site, and for the past few days our server has been crashing several times a day, locking up the CPU and maxing out the memory each time.
We’ve been racking our brains trying to find the cause and finally discovered over 3K queries being run on each page load. Over 2K of these were querying user meta data.
It turns out this plugin is returning all registered users on the site, looping through them and retrieving the meta data for each using a separate query for each and storing this on every page load, simply to check and see if there’s a stored twitter handle available for the post author of the current post in the loop.
While this might be no big deal on a site with less than 10 users (it’s still 9 more queries than necessary,) it turned out to be a total showstopper for us, with over 2K registered users to loop through.
For the time being we’ve simply commented out the loop that builds this “cache,” which seems to only prevent the &related= parameter from being added to the twitter action links that are added to the plugin output, and we have it as a very low priority to optimize this process. If we do get around to cleaning the code, we’ll be sure to send the code over to the plugin authors for review.
In the meantime if the plugin authors would like to have a look at this very serious bug, it’d be great to be able to restore full functionality of the plugin with no more than a plugin update on our part.
Thanks for your attention and remember, when writing a plugin, get_num_queries() is your friend!
https://www.ads-software.com/extend/plugins/twitter-blackbird-pie/
- The topic ‘[Plugin: Twitter Blackbird Pie] Plugin creates HUGE amount of unnecessary overhead’ is closed to new replies.