In my search to figure out how to get the API running I noticed a lot of people complaining about performance issues. During my journeys into the code to figure out how to use the API I noticed an over usage of the Variables table. This is a big nono that MANY modules fall into and it ends up causing really bad performance because the variables table was meant to hold small 100-500 byte config entries, not huge array data sets that so many modules are using it for these days. A new module has sprouted up that addresses this problem called Queryable Variables. Take a look at it, you might gain some performance out of it in a big way ;)

http://drupal.org/node/307559 <--explains performance enhancement and how its gained
http://drupal.org/project/queryable_variables <--module home, I used it for my own custom module and it REALLY sped things up. Like. A LOT.

Comments

wim leers’s picture

Status: Active » Closed (won't fix)

In order of importance:
1) It would require me to add a dependency on that module.
2) It's only used for storing the configs. Therefore it can't affect performance greatly.
3) The variables table is loaded only once and then cached in the session.

So, instead, you should try to convince the Drupal core committers to get your suggestion for better performance in core itself!

I'd reconsider if you could prove a performance difference of at least 20%. Typically, AJAX callbacks for HS only take 200-500ms, on a standard (i.e. not fine-tuned) server.