Wait for doc kits or spare kit counts specifically. This removes the chance of
race conditions between waiting for doc kits to shutdown and the spare kit to
start back up.
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: If28da4b786d3e2b429acb5840dfcdb7bb5a3f948
with the original 25 expected results from 25 requests
from cid#318925 Structurally dead code
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I236876fadd5b5c82ecdbcc52a13fc58e8513aa12
apparently since:
commit b0a7532b08
Date: Sat Nov 14 19:43:02 2020 +0300
Turn off broadcast on presentation preview tiles
so drop this field from TileDesc and protocol.txt
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ib4b1eca0d30911e13c245551cb3e3261afc99dd2
check this one like we check all the others
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Id8379c6873fe7dd6466dc265cea6847d120aa0ce
sometimes the deltas arrive in a different order, later in the same test
we have "ordering is undefined tiles arrive in so swap if needed" for
a pair of later deltas, so do the same reordering for this
intermittently failing earlier test
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: If51edb9a4e22d469d9e029c38da7348c34b17832
This should catch the case where one view should get an empty
update delta, and the other should get a new keyframe tile.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I3ad8f564cc45d80186430b463214ffcf092346f3
Also: address parts of #6897, primarily:
* remove the problematic aspect of bumping the last wid in our
TileData, when this could trigger a re-send of a previously
sent delta, causing tile corruption.
* instead append an empty wid entry.
* as an optimization - if the last entry is empty update
the wid - since re-sending an empty delta is of no
concern.
* simplify a number of code-paths that special-case zero length
deltas. All deltas now commence with 'D'.
* still track updates in the JS - by detecting empty deltas.
* shares more code and simplifies various paths.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I02af6d4b152524c201b6985b7a3497da7f08a517
However, don't force rendering a keyframe, only sending it - other
clients may be happy with deltas. This is to better handle:
window.app.console.debug('Unusual: Delta sent - but we have no keyframe for ' + key);
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I4efff0f6b1d2817e6b8bd567eb3b098383a1ef42
This stopped working well a long time ago, and is already disabled
on the coolwsd side, so dung out the rest of the code & docs on this.
Change-Id: I2e0b73fe9780e16c3cc74ae3a38ae6b04434717a
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Fails intermittently under load, responsible for most unit-tile
failures.
Change-Id: I88de8524b51ee7d97a28e31c001534a506d52f0e
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Based on the assumption that the new
number of tiles is correct, the assertion
is updated and the tile tests re-enabled.
Change-Id: I9dabe1ea4ec1b091917c4a94c549f967b9539c13
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
We now use our http::Socket and SocketPoll
instead of Poco.
Change-Id: I422c31d85e3422541a0ab367007876c3a33fa124
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Cleanup some debugging, distinguish wsd/viewport delta fetches from
client-side tilecombines.
Update tests for deltas where they are expected.
Change-Id: I3dca09e4ceb094abf03db2aed2618f19351f3e28
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Squashed from feature/deltas-expanded.
TileCache changes:
+ add montonic sequence (wid) numbers to TileData
+ account for sizes of TileData with multiple blobs
+ simplify saving and notifying of tiles
Sends updates (via appendChanges) based on the sequence the
right mix of keyframes and/or deltas required as a single
message, and parse and apply those on the JS side.
We continue to use PNG for slide previews and dialogs,
but remove PngCache - used by document tiles only.
Annotates delta: properly as a binary package for the websocket.
Distinguishes between deltas and keyframes we get from
the Kit based on an initial un-compressed prefix
character which we then discard.
kit can be forced to render a keyframe by oldWid=0
Track invalidity on tiles themselves - to keep the keyframe around.
We need to be able to track that a tile is invalid, and so subscribe
to the updated version as/when it is ready - but we also want to
store the keyframe underneath any deltas.
force rendering of a keyframe for an empty slot in the TileCache.
force tile sequence to be zero for combinedtiles - so the client can
always request standalone tiles with explicit combinedtiles, or tile
requests.
move Blob to Common.hpp
use zero size for un-changed tiles.
remove obsolete render-id, and color deltas in debug mode.
cleanup unit tests for non-png tile results.
Change-Id: I987f84ac4e58004758a243c233b19a6f0d60f8c2
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
For each tile, the wire-id will grow incrementally for each key-frame
or delta appended; so we can tell which deltas to send.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ic5f201d23273c37eed232c5932b9da854e80d06a
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
In an attempt to reduce the size of Util.{c,h}pp
which has grown to contain all sorts of unrelated
helpers, we move StringVector helpers into
the StringVector.{c,h}pp files.
This makes the code better organized.
Change-Id: I152f341606807ae66253415b951bc9f89b09df57
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
In NDEBUG builds, where there is no assert macro,
we log at debug level to still find issues without
adding noise to the logs.
However, in ENABLE_DEBUG builds not only do we assert
but we also log at error level.
Change-Id: I773dbf7bb2b459e505e73d91505b13d8ed2ed6d8
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
All tests are now ordered to minimize
the time paralell runs take. And the
two longest-running tests are augmented
to take less time. They still take about
20x longer than the fast test, but they
do serve a purpose and we have 50+ other
tests to go through in parallel.
Total time is not much longer than the
longest test with -j8, at around 150
seconds, give or take, on an 8 core,
16 thread CPU.
Duplication in Makefile.am is reduced
with some minor clean ups.
Change-Id: I14530531485bf85d8b59e476aa933e5b2cc26c93
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Now the remaining tests that didn't have a name
get one and the logs are unified between old-
and new-style tests. Mostly.
This makes sure that all logs and assertions
properly log the test name and make test
failures easier to debug and fix.
Change-Id: Id159ffacc81642a6ec594c5143498408adab67cf
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
TileCacheTests::testTileInvalidatedOutside is failing
locally, even on very old tests, because the tileinvalidation
returned is EMPTY (i.e. everything is invalidated)
which isn't expected.
Change-Id: I5ff9a3771d95d7177b8a3aee260223c4a17f906a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
ChildSession::loKitCallback() may generate a message in the format
"invalidatetiles: EMPTY, 0". Handle it properly in tests.
Signed-off-by: Luboš Luňák <l.lunak@centrum.cz>
Change-Id: If8009be3c4ce031466ed304df7028848a8ab960f
When I did the previous "C++17" commit I removed C++11 and C++14
from the checked list, but I missed the fact that the code checked
for C++17/14/11 and then did nothing with it. So actually do use
the detected required C++ standard.
Signed-off-by: Luboš Luňák <l.lunak@collabora.com>
Change-Id: Ia82d14d11f81456abed7ee2609903afe5366f5e7
When issuing tile render requests proactively (upon
getting invalidatetile event), if the registered
request has no subscriber, TileCache::saveTileAndNotify
simply drops the tiles!
New call sequence:
ClientSession::handleTileInvalidation
docBroker->handleTileCombinedRequest
tileCache().subscribeToTileRendering //< fix
The end result was that we rendered tiles only
to discard them, potentially leaving the clients with
stale tiles (unless they requested new tiles themselves).
If they do request them, we still benefit from the cached
copies of the internal requests we had issued (and dropped).
The issue is that we are wasting an opportunity for efficiency
and relying on the client to request tiles when we normally
push on invalidation, adding latency and being inconsistent.
Change-Id: I4d3aa3739c5324ffca15c80b20dce29ac03eef73
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This can happen on an assertion failure, and causes noise while looking
for real memory errors.
Also disable an unstable test, it's not clear that it passes depending
on how loaded the machine is (just increasing timeouts doesn't seem to
help).
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I049bd0a06f41e2d43702ec12a2c35944bc5200d8
TileCacheTests now completely uses
async WebSockets. It is both more
stable and faster (by about 20-25%).
Change-Id: I6da0fd12ddf671a7ad666561249b6fb1c5d32a01
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
SocketPoll is captured as weak_ptr into
WebSocketSession and a much better shutdown
support is now available. The new logic
can do async-shutdown after flushing and
will do sync-shutdown if SocketPoll is
no longer around.
Change-Id: Ia206cab58a13f20f7aeb3a6d8c57afee731c8231
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>