6.0.0-alpha12
6/9/25

[#4373] huge amount of queries
Summary huge amount of queries
Queue Kronolith
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners
Requester dgehl (at) inverse (dot) ca
Created 08/31/2006 (6857 days ago)
Due
Updated 08/31/2006 (6857 days ago)
Assigned
Resolved 08/31/2006 (6857 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
08/31/2006 10:34:51 PM Chuck Hagenbuch Deleted Original Message
 
08/31/2006 10:34:29 PM Chuck Hagenbuch Comment #5
State ⇒ Resolved
Reply to this comment
Now _that_ was very specific and useful. I've consolidated the check 
even more into a single $addLinks variable in both HEAD and 
FRAMEWORK_3. Thank you!
08/31/2006 08:57:44 PM dgehl (at) inverse (dot) ca Comment #4 Reply to this comment
A similar kind of loop is present in views/Day.php ...
08/31/2006 08:42:39 PM dgehl (at) inverse (dot) ca Comment #3 Reply to this comment
I checked the kronolith/lib/views/Month.php file and in there, there 
Kronolith::hasPermission('max_events') is called for every day of the 
month view.

When I move the function call outside the 'foreach day' loop, the 
number of database queries drops dramatically.



Here's a diff

RCS file: /repository/kronolith/lib/Views/Month.php,v

retrieving revision 1.9

diff -r1.9 Month.php

122c122

<

---
       $hasPermission = Kronolith::hasPermission('max_events');
159d158

<

162,163c161,162

<                      Kronolith::hasPermission('max_events') === true ||

<                      Kronolith::hasPermission('max_events') > 
Kronolith::countEvents())) {

---
                      $hasPermission === true ||
                      $hasPermission > Kronolith::countEvents())) {
08/31/2006 06:41:25 PM Chuck Hagenbuch Comment #2
State ⇒ Not A Bug
Reply to this comment
There are tickets to deal with the datatree and other issues 
specifically. This is not useful to us as a bug report or enhancement.
08/31/2006 05:53:54 PM dgehl (at) inverse (dot) ca Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ huge amount of queries
Queue ⇒ Kronolith
New Attachment: kronolith.log
State ⇒ Unconfirmed
Reply to this comment
Opening kronolith (clicking on Organizing - Calendar) generates an 
enormous amount  of SQL queries (even with

$conf['group']['cache'] = true;

$conf['share']['cache'] = true;

)


Saved Queries