Remove out-of-process backend
Disman has two modes for instantiating a backend:
- In-process: the consumer of Disman runs the backend code in its own process.
- Out-of-process (oop): Disman launches a separate D-Bus service (also provided by Disman) via method call and communicates with that via D-Bus.
The commit that added the oop backend provided the following description:
Author: Dan Vrátil <[email protected]> Date: Wed Oct 22 15:23:38 2014 +0200 Introduce out-of-process KScreen backends Until now KScreen was loading the backend plugin into each KScreen-enabled application. This patch changes the design completely: The KScreen library now requests a backend (which is represented by a DBus interface) from BackendManager (a replacement for BackendLoader). BackendManager will then start (if not running) kscreen_backend_launcher process (BackendLauncher), that will detect the correct plugin for the current platform, load it, and will create a DBus service called org.kde.KScreen.Backend.%backendName% with org.kde.KScreen.Backend interface. The library will now communicate with the backend through this DBus interface. The out-of-process design solves many issues, including blocking calls in main thread, better performance (backend aggregates notifications before emitting them to clients, reducing number of "changes" clients have to handle, and better stability (backend crash does not crash the application).
- The oop code is big and complex.
- Setting up the correct D-Bus service connections can be difficult when not installed in the default location.
- In regards to the description above oop does not provide that much functionality anymore today:
- Disman is stable enough to not crash all the time.
- Wayland backends receive atomic updates as protocols guarantee.
- KDisplay has a change compressor.
- When testing calls in the backend freeze the application only to a minimal degree.
- In Disman the out-of-process backend is currently disabled in general because I couldn't get the D-Bus service to work in my setup.
- Wayland backends do not use the out-of-process backend at all.
The last point is of importance in a long-term perspective. Why keep the complexity around when we only use it with RandR anymore?
Remove the oop backend completely and provide only in-process backends.