[development] load node globally
anthony at thrillist.com
Thu Jan 15 21:53:27 UTC 2009
I believe any further calls to node_load with the same node id are cached.
Web Applications Developer
568 Broadway Ste. 605
New York, NY, 10012
From: Ashraf Amayreh <mistknight at gmail.com>
Reply-To: <development at drupal.org>
Date: Thu, 15 Jan 2009 13:50:10 -0800
To: <development at drupal.org>
Subject: [development] load node globally
Since I see so many node loads in block visibility and in modules that do $node manipulations and so forth, which would make me think that sometimes many node loads might occur on some pages and tens perhaps when you add contributed modules on that, I was wondering why not just load $node globally on node/<num>/* pages like we do with $user to avoid any extra node_loads? Developers would only need to global $node and it would either be null or populated and ready.
Before creating a patch for a *possibly* terrible idea, I thought I'd raise a stick and see if it gets shot :D
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the development