So many DB queries
Additionally, there are multiple permissions checks going on, and things of that nature.
C5 will soon be featuring an object cache for this very reason.
Coming from a somewhat big company where although adding more resources was possible and frequently done, there were a few folks who really pushed efficient use of sql.
I have noticed that in some places (haven't dug too deep yet) that the practice of
select ... from
for each row in select query
insert into ... values
is utilized instead of one query of
insert into ... select from...
line 185 or so of ./concrete/models/page.php
could be replaced with something like:
$v = array($this->cID, $this->getPermissionsCollectionID()); $q = "insert into PagePermissions (cID, uID, gID, cgPermissions, cgStartDate, cgEndDate) select '?', uID, gID, cgPermissions, cgStartDate, cgEndDate from PagePermissions where cID = ?"; $r = $db->query($q, $v);
Its a small example that illustrates the point. It may be that the data abstraction layer dictates the earlier method.
For my purposes on some very low volume pages all served by a dedicated mysql machine, I'm not too worried about it. If I was running a wicked popular site I would hunt down these types of queries. Then again, its in the backend so perhaps not much of an issue at all.
Keep up the good work.