Commit graph

18 commits

Author SHA1 Message Date
Miklos Vajna
0b488905f9 MessageQueue: it and payload are the same, keep only one of them
It confuses me that 'it' is a reference, while 'payload' is a value, so
even if payload is a const value that's never written, it's not OK to
change it to a reference, as the underlying memory is released by the
in-between erase() call.

Change-Id: I05ad0f64e3eeedf847b74a6fadff610fc7469aa1
2016-09-23 09:04:23 +02:00
Ashod Nakashian
1641f756b2 loolwsd: improved logging
Change-Id: I1a1559754efcb0614875dc76ae0637ed6dc1ba77
Reviewed-on: https://gerrit.libreoffice.org/29160
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-22 03:32:48 +00:00
Ashod Nakashian
0326aa4304 loolwsd: cancel individual tiles
Change-Id: I18faee319fc12de2151460afbb054b8509578579
Reviewed-on: https://gerrit.libreoffice.org/29120
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-21 05:15:30 +00:00
Ashod Nakashian
9e5df31cbb loolwsd: make sure to combine all contiguous tiles
Change-Id: If65e2ff53f593015ba7df23b6943a711c36550de
Reviewed-on: https://gerrit.libreoffice.org/29119
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-21 05:14:41 +00:00
Ashod Nakashian
e9f37433d7 loolwsd: combine tiles before rendering to reduce latency
Change-Id: I5af2d2a9ddf3b5a3db5bc5f0835687d7cae5b17c
Reviewed-on: https://gerrit.libreoffice.org/29115
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-21 04:59:49 +00:00
Ashod Nakashian
c01629ab2a loolwsd: only prioritize tile messages and not tilecombine
Change-Id: Ia292e5b499dd4409dc3a672e4d5360c868d6c71f
2016-09-14 23:20:12 +01:00
Ashod Nakashian
ece87da287 loolwsd: tile prioritization per view cursor
Change-Id: I1410b64982ac2db04e5a47d744a95b8d2eab5f7e
2016-09-14 23:19:38 +01:00
Miklos Vajna
74a29c4ee4 MessageQueue: avoid allocation of unnecessary temporary strings
Change-Id: I9162407020d84d0c92c9d1c6dfab806c67f3b873
2016-09-13 08:41:51 +02:00
Ashod Nakashian
2663f9b63f loolwsd: replace old tile requests with more recent ones
A new queue with own thread now processes tile requests
so we have a chance to cull backlogged tile requests
that have since been invalidated.

This reduces load on the server significantly, especially
with multiple view at different zoom levels, and very fast
typing.

Change-Id: I6599939cd363dc71c30187f40d542aa37260dc56
Reviewed-on: https://gerrit.libreoffice.org/28607
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 20:47:10 +00:00
Miklos Vajna
30d90d6b96 loolwsd: using range-based loops is more readable here
Change-Id: I9533c74dbcd6622a01b21096109edc3b27e797e3
2016-04-28 08:44:01 +02:00
Miklos Vajna
78308db763 loolwsd: remaining 'unnecessary copy' fixes
Change-Id: I138e8473a002a15aae7752136950bb905a21fb1f
2016-04-27 14:58:33 +02:00
Miklos Vajna
89f79a1bf4 MessageQueue: moving a local object in a return statement prevents copy elision
As pointed out by clang -Wpessimizing-move.
2016-03-29 13:36:30 +02:00
Jan Holesovsky
9e180171c2 WaE: Shadowed variable. 2016-03-29 12:42:45 +02:00
Ashod Nakashian
69b4f42d3c loolwsd: preparing MessageQueue for vector<char> payload
Change-Id: I30bf7b4c641f4363790587ddc8ba8fb2bf9d269a
Reviewed-on: https://gerrit.libreoffice.org/23582
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-29 02:46:54 +00:00
Henry Castro
e0241b1825 loolwsd: Added remove_if to MessageQueue
Change-Id: If4e72796eb39ee66e7604cf67688329fc94d9539
Reviewed-on: https://gerrit.libreoffice.org/20900
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:09:48 +00:00
Jan Holesovsky
dacd176c84 loolwsd: We wanted to call the _impl() version.
This was in preparation for a more complex Queue; maybe we should just remove
the non-needed _impl() versions again (?)
2015-12-17 18:50:00 +01:00
Miklos Vajna
2bb596a256 loolwsd: coding style
If README says "spaces, not tabs" and "braces go on separate lines",
then be consistent about it before it gets normal to not respect those
rules.
2015-11-24 09:43:17 +01:00
Jan Holesovsky
6a1477d8a9 loolwsd: Specialize the MessageQueue a bit.
Introduce a bit of hierarchy there, at some stage we'll want to re-order the
tile requests a bit so that it works better for collaborative editing; for the
moment, removing the duplicate entries is enough.
2015-11-09 11:54:09 +01:00