Commit graph

74 commits

Author SHA1 Message Date
Noel Grandin
4199efc91c convert enums to scoped
Change-Id: Ic3d4c09dbcec28b4638bb8888f812f970f40a1c5
Reviewed-on: https://gerrit.libreoffice.org/32331
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-12-22 09:51:56 +00:00
Ashod Nakashian
1376856107 wsd: logging updates
Change-Id: Icbee0349a3cfda5a56f8d681c779484e18b98ab6
Reviewed-on: https://gerrit.libreoffice.org/32287
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-21 15:01:20 +00:00
Henry Castro
f0c5e907ab kit: debug, simulate loading document
Very useful when the bug is reproducible in the preinit, init lokit stages,
so the scenario can be isolated.
2016-12-17 08:32:49 -04:00
Henry Castro
38549b0c9b kit: debug, wait until unique kit die
Very useful to debug preinit stage when it is
ensured 1 kit process
2016-12-17 07:56:03 -04:00
Henry Castro
20f6d8cdc7 kit: cosmetic
Required to custom lokit process debug
2016-12-16 23:39:53 -04:00
Henry Castro
e71c0046e7 kit: save first lokit PID
This is required to debug preinit stage
2016-12-16 23:39:08 -04:00
Ashod Nakashian
477ca6f414 loolwsd: cleanup the Sessions
Change-Id: I3cd065ab84e17f943fa7de7e094db574ff6fde07
Reviewed-on: https://gerrit.libreoffice.org/31931
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-13 04:35:00 +00:00
Ashod Nakashian
e60bc28a00 loolwsd: LOOLSession -> Session
Change-Id: I94369480fb0a6789375dfe5610ada300e94b80eb
Reviewed-on: https://gerrit.libreoffice.org/31930
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-13 04:34:19 +00:00
Miklos Vajna
645049e081 Kit: clean up redundant member initializers
Change-Id: I3a320d9647ab729e71ce93ce90fb63eb3b39ae35
2016-12-06 14:05:49 +01:00
Ashod Nakashian
c7e5874eff loolwsd: invalidate all parts when document size changes
This is a stop-gap until Core sends these invalidations
with more precision. Otherwise, we may be wasting valuable
cache data here.

This fixes showing incorrect tiles when slides are
inserted/removed from a doc.

Change-Id: I7a02c6fb96ff27223afe71d891db639ab5b2cfae
Reviewed-on: https://gerrit.libreoffice.org/31616
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-05 04:50:35 +00:00
Jan Holesovsky
2b13cfa1a7 Don't send setpart: to text documents, it will always jump to the 1st page.
Change-Id: I809f2ba493329174a33f99d63eec2c60b38acb05
2016-12-01 12:28:03 +01:00
Ashod Nakashian
c326228774 loolwsd: improved MessageQueue
Tiles no longer hog the queue ahead of all else.

We now give priority to callback events, so clients
get to know the document state sooner.

Since tiles take long to render, an equal time
is given to non-tiles (capped at 100ms).

Finally, Impress preview tiles are given
the lowest priority and rendered only when
the queue is drained.

Change-Id: I922c1e11200e5675f50d86b83baee1588cbbf66f
Reviewed-on: https://gerrit.libreoffice.org/31394
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-30 04:42:40 +00:00
Ashod Nakashian
283cf812de loolwsd: Writer doesn't have parts
Fixup the part for EMPTY invalidation as well.

N.B. Should replace 'EMPTY' with '0,0,INT_MAX,INT_MAX'
to be consistent. Since both are expected, no compat
issues should be expected.

Change-Id: I066981622b1de71e9e849530df0583291b74b804
Reviewed-on: https://gerrit.libreoffice.org/31393
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-30 04:40:09 +00:00
Henry Castro
4366d6aad4 kit: render font failure if and only if fails encode PNG 2016-11-29 20:24:13 -04:00
Ashod Nakashian
7a4250b90e loolwsd: terminate forkit when wsd dies
When we the pipe with wsd is closed we
assume wsd has died and we terminate too.

WSD can fork us anew, if it's still alive.

Change-Id: I669ed717db973b50498a6bc08e1fca59c6563443
Reviewed-on: https://gerrit.libreoffice.org/31337
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-29 02:42:46 +00:00
Ashod Nakashian
b35725ab70 loolwsd: support more efficient full-buffer hashing
Change-Id: Ie30929ad4665b51e280c1126adde645742814dad
Reviewed-on: https://gerrit.libreoffice.org/31294
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-28 05:03:17 +00:00
Ashod Nakashian
da30dc3df3 loolwsd: factor out the png cache lookup
Change-Id: Id287b136b687d9bc4f49a3583e18cb820f4eb21e
Reviewed-on: https://gerrit.libreoffice.org/31293
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-28 05:02:34 +00:00
Ashod Nakashian
ef9ab94580 loolwsd: less aggressive png cache eviction
The overall hit-rate improves significantly
when we don't remove entries too soon.
Here we give entries more time to show their
merrit.

There are now two limits, soft and hard.
The former is used to remove entries with no
hits at all, while the latter is used to
avoid overflowing the cache footprint too
much. Entries also get started with a single
hit, which prevents them getting evicted
too soon (i.e. right after getting added).

Finally, there is no longer need to reduce
the hit count of entries too agressively
since we have two tiers (soft and hard limits)
and zero-hit entries are removed before others.

The average cache size while auto-typing in
Writer doc is less than 180kb, which is 1.4x
the original size of 128kb.

Change-Id: I946318151638c9c64c714190084c492f9098852b
Reviewed-on: https://gerrit.libreoffice.org/31291
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-28 04:58:51 +00:00
Ashod Nakashian
9608935a7c loolwsd: png cache hit rate and cosmetics
Change-Id: I66ab1738503618002bb05504c608969d5aa7b9a9
Reviewed-on: https://gerrit.libreoffice.org/31290
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-28 04:57:45 +00:00
Henry Castro
ddd91b4251 kit: enable notify undo/redo commands 2016-11-27 23:39:37 -04:00
Henry Castro
7760d6d6d5 wsd: fix URL encoded char parameter 2016-11-27 22:24:45 -04:00
Michael Meeks
85583f0a89 Avoid PNG compression for un-changed tiles. 2016-11-25 15:48:56 +00:00
Michael Meeks
c1a398977f Adapt makefiles, includes etc. to new locations. 2016-11-25 09:58:57 +00:00
Michael Meeks
cca657c8f2 Apply the pre-branch rename script to re-organize the source. 2016-11-25 09:58:48 +00:00