Performance: Don't resolve tag members on every mail message preview
This process might be expensive when using tags heavily and we already do this when we list messages.
This commit is contained in:
parent
45ce87f545
commit
f8bd2c91ad
1 changed files with 3 additions and 3 deletions
|
@ -352,7 +352,7 @@ class kolab_tags_engine
|
|||
$tags = array();
|
||||
|
||||
foreach ($taglist as $tag) {
|
||||
$tag = $this->parse_tag($tag, true);
|
||||
$tag = $this->parse_tag($tag, true, false);
|
||||
if (in_array($uid, (array)$tag['uids'][$folder])) {
|
||||
unset($tag['uids']);
|
||||
$tags[] = $tag;
|
||||
|
@ -471,7 +471,7 @@ class kolab_tags_engine
|
|||
/**
|
||||
* "Convert" tag object to simple array for use in javascript
|
||||
*/
|
||||
private function parse_tag($tag, $list = false)
|
||||
private function parse_tag($tag, $list = false, $force = true)
|
||||
{
|
||||
$result = array(
|
||||
'uid' => $tag['uid'],
|
||||
|
@ -480,7 +480,7 @@ class kolab_tags_engine
|
|||
);
|
||||
|
||||
if ($list) {
|
||||
$result['uids'] = $this->get_tag_messages($tag);
|
||||
$result['uids'] = $this->get_tag_messages($tag, $force);
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
|
Loading…
Add table
Reference in a new issue