Bug 487064 - QML Baloo.Monitor has blocking DBus calls
Summary: QML Baloo.Monitor has blocking DBus calls
Status: RESOLVED FIXED
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: baloo-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-15 15:57 UTC by Janet Blackquill
Modified: 2024-05-18 15:22 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: Frameworks 6.3
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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