Commit graph

25 commits

Author SHA1 Message Date
Ashod Nakashian
366e0e21d5 loolwsd: support timeout on MessageQueue get
Change-Id: Iaad39aaa06c59cdacdd4a864599ef6a4a12976f8
Reviewed-on: https://gerrit.libreoffice.org/29648
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:29:50 +00:00
Jan Holesovsky
a1e9c1eb42 Handle the Impress slide previews with low priority + unit test.
After processing a tile request for a slide preview, move the rest of them to
the end of the queue, so that other events are processed before we render the
next preview.

Change-Id: I82aa411406d6731b1c0bf3b849780220b5e68110
2016-10-04 14:25:52 +02:00
Jan Holesovsky
cbf9556b0a Simplify the code around priorities and view ordering in TileQueue.
No functional change.

Change-Id: If34747a069032b13d7d9eb232b1bf10cef967afa
2016-09-30 22:38:20 +02:00
Jan Holesovsky
f101b2b7cb Check we get views prioritized according to when the cursor was updated.
Fails with any of e5adf272b8,
d9c90e30fd or
4e7ba53a2b reverted.

Change-Id: I5a9384f20ae1f64e29509ec568670e29c3c4eb94
2016-09-30 22:22:23 +02:00
Jan Holesovsky
e5adf272b8 Search harder for the highest priority tile.
Without this, any cursor intersecting with the tile was treated as the
priority.

Change-Id: I6bc4629620d368ce383900386a00c535255ee133
2016-09-30 22:02:40 +02:00
Jan Holesovsky
c8a97eb300 Move testTileQueue from WhiteBoxTests to TileQueueTests.
Change-Id: Ib592c425d595e1d3449092bd0b9008c1b857274a
2016-09-29 20:32:25 +02:00
Miklos Vajna
31867f669d Fix remaining uninitialized members
The missing init of mutexes is probably theoretical, the TraceFile and
the Unit ones were real errors, I think.

Change-Id: If19c23a9c93d34059998346af8d45c26a34043a6
2016-09-28 10:20:48 +02:00
Jan Holesovsky
da061317ff Trivial tilecombine unit test for TileQueue.
Fails with any of 137e677eb0 or
fb0e041232 reverted.

Change-Id: Ib025e5d943eef1306e89167260ad352b0ecaf65b
2016-09-27 17:11:06 +02:00
Jan Holesovsky
fb0e041232 De-duplicate the tiles resulting from the tilecombine split.
Change-Id: I836915c06685f94b01a4d3af66092b9f45e82217
2016-09-26 10:55:14 +02:00
Ashod Nakashian
d9c90e30fd loolwsd: move the editing view to the front
Swapping the views makes the current front
go to some random location, which isn't fair.

Change-Id: I147aceb6bc5e5eb751a86d557d72ecdedb34af23
Reviewed-on: https://gerrit.libreoffice.org/29286
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-26 02:49:48 +00:00
Ashod Nakashian
552a8a6f9b loolwsd: removed BasicTileQueue which served no purpose
Change-Id: If0a768dcc71e6a9957f52abe1f44b242ab3c836f
Reviewed-on: https://gerrit.libreoffice.org/29285
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-26 02:49:36 +00:00
Jan Holesovsky
4e7ba53a2b Prioritize the views where the cursor moved the most recently.
Even the order of the views matters when the editing is happening.

Change-Id: Id0868a8198f9fa955512fccba57fa063eab46e8c
Reviewed-on: https://gerrit.libreoffice.org/29284
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-26 02:48:49 +00:00
Jan Holesovsky
c97ebfc585 Prioritize the tile requests when extracting from the TileQueue.
When putting tiles into the queue, do only the de-duplication,
reprioritization is better at the get() time - no need to keep shuffling
the priorities according to the cursor moves etc. all the time.

The tile combination then does the rest of the work for us :-)

Change-Id: I100c433dd3b24228d1ca8e4c89891635db1115c1
Reviewed-on: https://gerrit.libreoffice.org/29283
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-26 02:46:59 +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
ece87da287 loolwsd: tile prioritization per view cursor
Change-Id: I1410b64982ac2db04e5a47d744a95b8d2eab5f7e
2016-09-14 23:19:38 +01:00
Miklos Vajna
78308db763 loolwsd: remaining 'unnecessary copy' fixes
Change-Id: I138e8473a002a15aae7752136950bb905a21fb1f
2016-04-27 14:58:33 +02:00
Tor Lillqvist
9e0a8cc43f These are not overridden in derived classes, no need to be virtual 2016-04-01 18:57:07 +03:00
Tor Lillqvist
e3f8fc41a1 Add 'override' 2016-04-01 18:57:06 +03:00
Tor Lillqvist
6c78a8f633 Typo 2016-04-01 18:57:06 +03:00
Ashod Nakashian
3217b4592a loolwsd: queue payload changed to vector<char>
All messages now pass through the queue.
This resolves a race between single-line
messages and multi-line ones.

Previously, single-line messages were
processed on the queue (on a background
thread) while multi-line ones were handled
immediatly. This resulted in order-inversion
due to a race between the queue thread and the
next multi-line message, which caused stability
issues every so often.

Change-Id: Ia220791d1d75c4f3e3e0965dd0c6f81bae63a296
Reviewed-on: https://gerrit.libreoffice.org/23583
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-29 02:47:27 +00: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
Tor Lillqvist
e7e1ef58ae Cosmetics: Sort and prune #include and 'using' lines 2016-03-08 09:44:04 +02: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
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