wsd/SenderQueue.hpp |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 9234dc4dc256bfb7a4a3e3680de4dfaaa451ed47
Author: Ashod Nakashian <ashod.nakash...@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 <ashnak...@gmail.com>
    Tested-by: Ashod Nakashian <ashnak...@gmail.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:")
         {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to