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!
This commit is contained in:
Bharat Mediratta
2008-12-16 04:29:00 +00:00
parent dc08917345
commit d9e02a5d0c
6 changed files with 61 additions and 40 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ class user_Core {
* @return User_Model
*/
static function guest() {
return ORM::factory("user", 1);
return model_cache::get("user", 1);
}
/**