Bug 487064

Summary: QML Baloo.Monitor has blocking DBus calls
Product: [Frameworks and Libraries] frameworks-baloo Reporter: Janet Blackquill <uhhadd>
Component: generalAssignee: baloo-bugs-null
Status: RESOLVED FIXED    
Severity: normal CC: 4wy78uwh, nate, tagwerk19
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: Frameworks 6.3
Sentry Crash Report:

Description Janet Blackquill 2024-05-15 15:57:13 UTC
First one is a blocking property getter in Monitor::balooStarted:
    slotIndexerStateChanged(m_scheduler->state());

The other one is implicit coercion of a QDBusPendingReply to its result type in Monitor::updateRemainingTime:
    auto remainingTime = m_scheduler->getRemainingTime();
    if ((remainingTime != m_remainingTimeSeconds) && (remainingTime > 0)) {

These calls can cause the main loop of the KCM & other consumers to freeze if the daemon is busy, and increases latency in normal circumstances.
Comment 1 Bug Janitor Service 2024-05-15 16:38:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/baloo/-/merge_requests/197
Comment 2 Janet Blackquill 2024-05-16 16:09:47 UTC
Git commit 8c11e0290d2a7713d6c627e42ea56c92047acd7b by Janet Blackquill.
Committed on 16/05/2024 at 16:07.
Pushed by jblackquill into branch 'master'.

qml: don't do blocking DBus calls in Baloo.Monitor

This makes the experience more responsive, especially if the system is under load.

M  +33   -7    src/qml/experimental/monitor.cpp

https://invent.kde.org/frameworks/baloo/-/commit/8c11e0290d2a7713d6c627e42ea56c92047acd7b