• So I’ve been doing a few performance enhancements at work and stumbled upon an installation of this plugin in our blog. It was doing ~70 queries on any given page, 1 for every author of our blog. Awesome stuff.

    Even placing the queries behind APC means that each fresh, un-cached page view will result in about 70 extra queries to our database. 70 queries that can be all done at once, en masse.

    It appears that the problem function is BlackbirdPie->embed_head(). I’ve attached a single gist that fixes the issue for our use case. We don’t allow non-author users on our blog, so I didn’t need to verify that the user_id and twitter handle was attached to an editor etc., but if this is necessary, we can do this via a join, requiring still only a single query, as opposed to 1 per WordPress user.

    Feel free to critique the code change itself, I look forward to getting some conversation going on this. I’m sure there are others out there who have this issue and don’t even know it 😉

    https://gist.github.com/1227588

    http://wordpress.org/extend/plugins/twitter-blackbird-pie/

Viewing 1 replies (of 1 total)
  • Plugin Author bradvin

    (@bradvin)

    thanks for posting this code. I will look into this issue, go over your code changes, and post an update to the plugin

    many thanks
    Brad

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Twitter Blackbird Pie] Performance improvements in latest version of Twitter Blackbird’ is closed to new replies.