From 171724d6f8bbce1e73309247cdeff134d7f5c908 Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Thu, 21 Sep 2017 19:35:29 +0200 Subject: [PATCH] Update comment --- .../matrix-org/dendrite/syncapi/sync/requestpool.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/syncapi/sync/requestpool.go b/src/github.com/matrix-org/dendrite/syncapi/sync/requestpool.go index a3316706c..7b4bbcbcf 100644 --- a/src/github.com/matrix-org/dendrite/syncapi/sync/requestpool.go +++ b/src/github.com/matrix-org/dendrite/syncapi/sync/requestpool.go @@ -169,8 +169,11 @@ func (rp *RequestPool) currentSyncForUser(req syncRequest, currentPos types.Stre func (rp *RequestPool) appendAccountData( data *types.Response, userID string, req syncRequest, currentPos types.StreamPosition, ) (*types.Response, error) { - // TODO: We currently send all account data on every sync response, we should instead send data - // that has changed on incremental sync responses + // TODO: Account data doesn't have a sync position of its own, meaning that + // account data might be sent multiple time to the client if multiple account + // data keys were set between two message. This isn't a huge issue since the + // duplicate data doesn't represent a huge quantity of data, but an optimisation + // here would be making sure each data is sent only once to the client. localpart, _, err := gomatrixserverlib.SplitID('@', userID) if err != nil { return nil, err