[development] RFC: info hook standardization

Larry Garfield larry at garfieldtech.com
Tue May 20 15:01:00 UTC 2008


On Tue, 20 May 2008 10:15:17 -0400, "Darrel O'Pry" <darrel.opry at gmail.com> wrote:
> On Mon, May 19, 2008 at 11:18 PM, Larry Garfield <larry at garfieldtech.com>
> wrote:
> 
>> On Monday 19 May 2008, Darrel O'Pry wrote:
>> > I just think it wold be cool to support both options, as some items
> may
>> be
>> > user specific. I'm not excluding normal cache_set/cache_get. I'm still
>> > think in terms of a more general cacheable module_invoke_all  and not
>> > specifically hook_*_info.
>>
>> There may be an advantage to that, but that's separate from what I'm
>> proposing. :-)
>>
>> It sounds like most people are in favor of something like this, though. 
> Is
>> anyone opposed to some written standards that we can then apply to code?
> 
> 
> It still remains to be seen if it's worthwhile.... Iterating over a few
> functions returning static arrays to to be merged vs a db_query()  to be
> benchmarked... I personally think the db query will probably lose this
> race.

hook_menu(), hook_views_default_views(), hook_theme(), hook_schema(), and a dozen others would disagree with you.  Very often the data isn't just cache_set()ed but parsed out into an easily-queried table.  On the memory front, the database wins.

--Larry Garfield



More information about the development mailing list