mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-23 07:15:50 -04:00
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:
@@ -73,7 +73,7 @@ class user_Core {
|
||||
* @return User_Model
|
||||
*/
|
||||
static function guest() {
|
||||
return ORM::factory("user", 1);
|
||||
return model_cache::get("user", 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user