One of the annoying bits of block configuration is that the configuration has to be stored and retrieved in the database. No matter where you put it (a dedicated db table, variable_get/set()), it still requires additional db-to-website communication.
- variable_get()/variable_set(). This is the current method that menu_block uses to store each block’s configuration. The benefit of this method is that the variable table is read once from the database for each page request and menu_block doesn't need to pull any additional data from the database (i.e. zero extra db queries). The negative side to this is that Drupal’s variable table is already pretty bloated and this just adds to the problem.
- dedicated menu_block db table. This reduces the strain on Drupal’s variable table. But that means an additional db query. IMO, extra queries add up. One or two here, one or two there… I can probably do some tricks to load all the active menu blocks' configs at the same time.
So exportable configuration sound like a real win. The config would be stored in code and menu_block would just pull the config from a custom module's codebase. No database queries required.
I want to look at CTool's exportables, but haven't decided on any particular API for this yet.
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch menu_block-2x-ctools_exportables-693302-163.patch. Unable to apply patch. See the log in the details link for more information.
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch menu_block-ctools-693302-113.patch. Unable to apply patch. See the log in the details link for more information.