Commit graph

10 commits

Author SHA1 Message Date
Michael Meeks
69c6739e47 cool#9145 - KitQueue: re-work _tileQueue to use TileDesc.
This stops a huge amount of parsing, re-parsing and conversion
from strings and back, making our few N^2 loops over the tiles
much more efficient.

Retain queue tests with the same strings via using a helper
to convert back to something expected.

Replace TileDesc::getId() with isPreview().

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: If40fc45f1fb474d37371e4b949da5fdfc594fdc8
2024-05-23 19:50:09 +01:00
Michael Meeks
9eae552049 Split tile requests from the main incoming message stream.
Leave them as strings for now; this should be a pure re-factor.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ibad2bc343afe3fe32ea729623f6b03575c7b0121
2024-05-23 19:50:09 +01:00
Michael Meeks
bdc2041797 Remove un-necessary distinction between pop and get.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I2870a646f1e16cc138978dd84251bec1939aba13
2024-05-23 19:50:09 +01:00
Caolán McNamara
b85452b35b multiple "EMPTY" invalidations for different parts dropped as dups
since:

commit 6f49f9398e
Date:   Thu May 9 09:19:44 2024 +0100

    Split outbound callback processing from incoming message queueing.

an out by one adjustment

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ie5c2133dd7239aa62c017306c962c26ea6e526bb
2024-05-21 15:18:37 +01:00
Caolán McNamara
34b75306c3 AddressSanitizer: memcmp issue
/usr/bin/coolforkit
	memcmp
		asan/../sanitizer_common/sanitizer_common_interceptors.inc:875 (discriminator 9)
/usr/bin/coolforkit
	(anonymous namespace)::textItem(std::vector<char, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool&)
		online/kit/KitQueue.cpp:52
/usr/bin/coolforkit
	KitQueue::put(std::vector<char, std::allocator<char> > const&)
		online/kit/KitQueue.cpp:94

since:

commit f8a0d6c086
Date:   Thu May 9 15:29:49 2024 +0100

    Callbacks: minor efficiency wins, avoid tokenizing where we can.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ie5d0f86bb33c810b6a5f177421485c977b7fc79a
2024-05-10 16:16:49 +02:00
Michael Meeks
f8a0d6c086 Callbacks: minor efficiency wins, avoid tokenizing where we can.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I2ef647fd0af7bc83b7b40fd3ce7a49dc799f4339
2024-05-09 17:47:15 +01:00
Michael Meeks
6f49f9398e Split outbound callback processing from incoming message queueing.
Now we always send callbacks as soon as possible back to wsd from the
kit. This has several implications:

1. even when InputProcessing is disabled we will send outbound
   progress updates.
2. we should send callbacks much more quickly without waiting for
   other queue events to be processed eg. tilecombine:

We also drastically simplify storage of callbacks, avoiding lots of
re-parsing of the same strings, and allow much more efficient
comparison and merging at a small space cost in queue size.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ia1ede5406767f895616a52775316ee6ab1c5db09
2024-05-09 17:47:15 +01:00
Michael Meeks
320606c225 KitQueue - remove more un-necessary code, and helper use.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ic11db8ac1391bd22b4adcae40c99fa4ca99790f1
2024-05-09 17:47:15 +01:00
Michael Meeks
f4265ce8a7 KitQueue - move methods from header to source and simplify.
also rename and dissolve the previously virtual _impl methods.

Change-Id: Id77a5c3ce79b27406301ef336ac1c9a40ead15bf
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-05-09 09:50:08 +01:00
Michael Meeks
ebb4eda3df Move common/MessageQueue.cpp -> kit/KitQueue.cpp.
This is not common code, it's used only in the Kit.

Rename TileQueue -> KitQueue as well as unhelpful member variable naming.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: If158597f99f302cbc27e8eab139972f57a2fc3bb
2024-05-09 09:50:08 +01:00
Renamed from common/MessageQueue.cpp (Browse further)