libreoffice-online:private/kendy/tilesandcallbacks

Last commit made on 2016-09-23
Get this branch:
git clone -b private/kendy/tilesandcallbacks https://git.launchpad.net/libreoffice-online

Branch merges

Branch information

Name:
private/kendy/tilesandcallbacks
Repository:
lp:libreoffice-online

Recent commits

4408b4b... by =?utf-8?b?TMOhc3psw7MgTsOpbWV0aA==?= <email address hidden>

loleaflet: extend tile debugging

- show invalidated rectangles with fading effect
- show last tilecombine message and cancelled tile count
- show received/requested tile updates
- fix popup handling
- custom popup style (transparent, big numbers)
- clean up

(cherry picked from commit 68d3693d977e7a0137599eeba7a9de6cae06a2be)

9100749... by Jan Holesovsky <email address hidden>

Prioritize the views where the cursor moved the most recently.

Even the order of the views matters when the editing is happening.

Change-Id: I2920d787a922059f76d6cec1fb5cddbf328409b3

bf8df03... by Jan Holesovsky <email address hidden>

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: Ie9a57dc8d0026b8724e8d0996e9c76ada91def11

ef0788d... by Jan Holesovsky <email address hidden>

This TODO is obsolete when we have ordering of tiles & invalidations.

Change-Id: Iaadeaa5958439234ffaf81e2b67ef11e9b0e13c0

e19167b... by Jan Holesovsky <email address hidden>

Fix a race between the tile rendering and invalidation callbacks.

Instead of 2 queues and 2 threads, merge those to one - which gives a perfect
ordering of the invalidations and rendering.

Change-Id: Id12cb8493f3c0bee44db34161adb0bd4b504ed46

a5025dd... by Jan Holesovsky <email address hidden>

Revert "bccu#2018 - Missing tiles when finished typing"

This reverts commit 342125b8ead18ac79dd644063e58496afd5d7d38.

0b48890... by Miklos Vajna <email address hidden>

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

b6448a8... by Pranav Kant <email address hidden>

loleaflet: Move loading spinner to toolbar-down when doc loaded

Change-Id: If3ae7801b8438da490f1ceba2e61824518bdc94d

c23b37f... by Pranav Kant <email address hidden>

loleaflet: Better to have 'reconnected' signal here

Change-Id: I50c9484bb591d7192977fe49adb75f99d8ee1b08

342125b... by Ashod Nakashian <email address hidden>

bccu#2018 - Missing tiles when finished typing

aka: don't save invalidated tiles into cache

Tiles that are rendered when invalidation is recieved are outdated.

What we do is remember the last tile version when we get an invalidation.
This tile version, and any preceding it, is out of date and should not
get saved in the tile cache.

This fixes a race between rendering and invalidation, which happens
in the following scenario.

1. Tile requested for rendering.
2. User inputs key.
3. While tile is rendering, the tile is invalidated in Core
   (the shared lock between rendering and processing input doesn't
   include parsing tile request or preparing the payload back).
4. Once the tile rendering is done, but before it's encoded and sent back,
   the invalidation is received on the callback.
5. Tile cache is cleared of that tile.
6. The outdated tile is received on its way to the client, saved in cache.
7. Client requests the tile anew upon getting the invalidation.
8. The tile is served from the cache, which is outdated, therefore
   missing the last key input form the user.

The fix is in #3 to remember the version number of the tile being
rendered. Then in #6 we forward the tile to the client, but we
do not store it in cache. In #8 the tile request results in a new
rendering, since the cache will not have the tile. Only this last
rendering of the tile is saved in cache for future requests.

Change-Id: I0b0a3c2b917906c0d0c9046e3e6d3d4d354a7777
Reviewed-on: https://gerrit.libreoffice.org/29209
Reviewed-by: Ashod Nakashian <email address hidden>
Tested-by: Ashod Nakashian <email address hidden>