[development] low hanging fruit for Drupal 6: variable defaults

Gabor Hojtsy gabor at hojtsy.hu
Thu May 3 16:34:17 UTC 2007

Larry Garfield wrote:
> As long as we're mucking about in the variable system, the cache system recently introduced a "serialized" flag to specify if a given value needs to be serialized or not.  (I believe the default was object/array = serialize else don't bother.)  That saves the unserialization time on a string or int.  Given that the variable table is loaded completely on a page load, I think the same thing could work here to reduce the amount of deserialization required.  I dare say half of the stuff stored there, probably more, is just ints and strings that don't need to be serialized.  (And it would make manually setting clean URLs off easier, a common support request. <g>)  I'm not sure how that impacts the registry/install question, but consider that a feature request while you're at it.

Larry, variables are loaded from the cache table as one big blob, and 
deserialized in bootstrap time. The code is in variable_init() and it 
does try a cache_get() first. This makes it indepenent of how the 
variables table is structured.


More information about the development mailing list