summaryrefslogtreecommitdiff
path: root/modules/user/helpers/user.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-12-16 04:29:00 +0000
committerBharat Mediratta <bharat@menalto.com>2008-12-16 04:29:00 +0000
commitd9e02a5d0c1a81925df33a9b25501fc90db91451 (patch)
treea10bc2a56861cd1c1adb2241d8e877ba12fcd2ae /modules/user/helpers/user.php
parentdc089173456c95dcec1e6184b8e6b5b2810ced52 (diff)
Various optimizations:
o Add model_cache::get() which caches models avoiding duplicate lookups o Stop using ORM relationships for Item_Model::owner so that we can use caching o For Item_Model::xxx_edit fields, don't make them editable for guests o Other minor stuff. These optimizations reduce the number of queries for a 9-photos page from ~200 to ~45. Still way too many!
Diffstat (limited to 'modules/user/helpers/user.php')
-rw-r--r--modules/user/helpers/user.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/user/helpers/user.php b/modules/user/helpers/user.php
index e7a3e165..a04542d3 100644
--- a/modules/user/helpers/user.php
+++ b/modules/user/helpers/user.php
@@ -73,7 +73,7 @@ class user_Core {
* @return User_Model
*/
static function guest() {
- return ORM::factory("user", 1);
+ return model_cache::get("user", 1);
}
/**