[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - wsd/SenderQueue.hpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Tue Apr 18 09:56:49 UTC 2017
wsd/SenderQueue.hpp | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
New commits:
commit c5e1991dac424b3a3b605b24fbf9ceee3e4908ee
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sun Apr 16 20:50:15 2017 -0400
wsd: drop duplicate setpart before sending to clients
When switching parts (either by the keyboard or mouse)
LoKit sends a notification of the current part and
invalidates tiles. As a reaction to that the client
cancels its tiles and requests new tiles for the
new part.
Since the response to setpart is a large number
of tile cancellation and new requests, the
cost of setpart is significant (esp. with large
number of clients). To avoid that, we de-duplicate
setpart entries from the client queues so there
would be only at most one setpart (the last)
queued to be sent to the client. This minimizes
the unnecessary noise when the part changes
faster than the server and/or network can
keep up.
Change-Id: I87578004203acc63d43e6d398ca04e37f766d9ba
Reviewed-on: https://gerrit.libreoffice.org/36597
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
(cherry picked from commit 9234dc4dc256bfb7a4a3e3680de4dfaaa451ed47)
Reviewed-on: https://gerrit.libreoffice.org/36607
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/wsd/SenderQueue.hpp b/wsd/SenderQueue.hpp
index 41445ac9..98059e49 100644
--- a/wsd/SenderQueue.hpp
+++ b/wsd/SenderQueue.hpp
@@ -104,12 +104,11 @@ private:
});
if (pos != _queue.end())
- {
_queue.erase(pos);
- }
}
else if (command == "statusindicatorsetvalue:" ||
- command == "invalidatecursor:")
+ command == "invalidatecursor:" ||
+ command == "setpart:")
{
// Remove previous identical enties of this command,
// if any, and use most recent (incoming).
@@ -120,9 +119,7 @@ private:
});
if (pos != _queue.end())
- {
_queue.erase(pos);
- }
}
else if (command == "invalidateviewcursor:")
{
More information about the Libreoffice-commits
mailing list