[Tickets #14368] Improve EAS performance with large History tables
noreply at bugs.horde.org
noreply at bugs.horde.org
Sat May 21 20:43:53 UTC 2016
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: https://bugs.horde.org/ticket/14368
------------------------------------------------------------------------------
Ticket | 14368
Created By | hannes.brunssen at ewetel.de
Summary | Improve EAS performance with large History tables
Queue | Synchronization
Version | FRAMEWORK_5_2
Type | Enhancement
State | New
Priority | 2. Medium
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
hannes.brunssen at ewetel.de (2016-05-21 20:43) wrote:
We noticed a few devices that never send SYNC requests for collections
like calendar oder contacts, because there are no changes. Without
SYNC requests the activesync_state entries are not updated and the
sync_mod values stay relatively low. With the low sync_mod values the
number of history entries that has to be checked on every PING
requests grow larger and larger. It takes a few seconds to check for
updates in over a million history entries for a single calendar which
is a growing part of our total database load. I don't know if this is
a client bug or just normal behavior.
These lookups can be reduced if we update the sync state from time to
time. This could be done if we override the getChanges method in
Horde_ActiveSync_State_Sql:
public function getChanges(array $options = array())
{
parent::getChanges($options);
if ($this->_type == Horde_ActiveSync::REQUEST_TYPE_PING &&
empty($this->_changes) &&
$this->_lastSyncStamp < $this->_thisSyncStamp - 10000) {
$this->_lastSyncStamp = $this->_thisSyncStamp;
$this->_type = Horde_ActiveSync::REQUEST_TYPE_SYNC;
$this->save();
$this->_type = Horde_ActiveSync::REQUEST_TYPE_PING;
}
return $this->_changes;
}
The type change is a bit ugly, but the save method would clear the
sync_data otherwise. That could be changed in the save method.
The update might only be needed on collections that support modseq,
but the connector is not available from the state. I don't know if it
would cause problems with mail folders, every 10000 seconds would be 8
times per day which would be more than necessary.
More information about the bugs
mailing list