Summary | Reduce number of calls of hasPermission(PERMS_READ) |
Queue | Kronolith |
Queue Version | FRAMEWORK_3 |
Type | Enhancement |
State | Resolved |
Priority | 1. Low |
Owners | jan (at) horde (dot) org |
Requester | patrick.abiven (at) apitech (dot) fr |
Created | 11/06/2009 (5761 days ago) |
Due | |
Updated | 11/07/2009 (5760 days ago) |
Assigned | |
Resolved | 11/07/2009 (5760 days ago) |
Milestone | 2.3.3 |
Patch | No |
Assigned to Jan Schneider
State ⇒ Resolved
Milestone ⇒ 2.3.3
getLink(). It would really reduce readability and maintainability if
this (and only this, i.e. not the delete and edit checks) is moved out
of this method.
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Queue ⇒ Kronolith
Summary ⇒ Reduce number of calls of hasPermission(PERMS_READ)
Type ⇒ Enhancement
State ⇒ New
In lib/Driver.php, adding a new optional argument $permsread in the
getLink() function enables a valuable optimization (15 seconds instead
of 21 seconds in our scenario). Instead of calling 3 times
hasPermission() we just do a single call.
In lib/Views/Month.php, function html()
$permread = $event->hasPermission(PERMS_READ);
$event->getLink($timestamp, true, $this->link(0, true, $permread)
And then in lib/Driver.php, function getLink() we do not call twice
hasPermission but we use the optional argument.
Regards