Bug 390476 - Muon rebuilds search index very often and inefficient
Summary: Muon rebuilds search index very often and inefficient
Status: RESOLVED WORKSFORME
Alias: None
Product: muon
Classification: Applications
Component: muon (show other bugs)
Version: 5.8.0
Platform: Neon Linux
: NOR grave
Target Milestone: ---
Assignee: Jonathan Thomas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-14 20:24 UTC by nrbrtx
Modified: 2020-12-05 10:22 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nrbrtx 2018-02-14 20:24:12 UTC
Steps to reproduce:
1. Install Muon on Ubuntu 16.04 LTS and launch it
2. Click "Check for updates"
3. Wait for "Rebuilding Search Index" to finish
4. After some time open Muon again (without 'apt-get update', 'aptitude update').
5. Get 'Rebuilding search index' message with background process /usr/sbin/update-apt-xapian-index and high CPU load and high temperature as the result.

Expected results:
Muon runs update-apt-xapian-index only when it's really needed. Muon allows user to search packages instantly after launch.

Actual results:
Muon rebuilds search index very often and inefficient. Muon does not allow user to search packages instantly after launch.

Note:
This bug is very similar to the Synaptic one (see https://bugs.launchpad.net/bugs/1685376).
It is caused by problems in apt-xapian-index (mainly https://bugs.launchpad.net/bugs/1612948).

Downstream bug-report:
https://bugs.launchpad.net/bugs/1741767
Comment 1 Carlo Vanini 2018-02-22 09:29:01 UTC
Git commit e4f2a1f79741c930802acab7150fa6b96240bed6 by Carlo Vanini.
Committed on 22/02/2018 at 09:27.
Pushed by vanini into branch 'master'.

Do not check status file for timestamp

Summary:
Update-apt-xapian-index is organised in plugins, each representing a
data source for the index. Each of them reports a timestamp of the
latest change, and the updated index takes the maximum of them as its
own timestamp.

We were checking the time of `Dir::State::status`
(`/var/lib/dpkg/status`), which is not used in any plugin. When it was
newer than all data sources, we would continuously see the index as out
of date.

Reviewers: sitter

Reviewed By: sitter

Differential Revision: https://phabricator.kde.org/D10715

M  +1    -8    src/backend.cpp

https://commits.kde.org/libqapt/e4f2a1f79741c930802acab7150fa6b96240bed6
Comment 2 Stefan Zurucker 2019-04-15 10:47:22 UTC
I feel the need to resurrect this bug report since the problem seems to have resurfaced (actually quite a while ago).

SUMMARY
Muon rebuilds its search index almost every time it is opened, even if only minutes have passed since the last time it was in use. It also does so right after installing a package. This leaves the user unable to search for or install packages during the time the index is being updated (which for me can take up to 2 minutes at times).

STEPS TO REPRODUCE
1. Launch Muon.
2. Search Index is rebuilding as indicated in the lower right corner.
3. Searching for a package yields 0 results until the index has completely been updated.


Operating System: KDE neon 5.15
KDE Plasma Version: 5.15.4
KDE Frameworks Version: 5.57.0
Qt Version: 5.12.0
Kernel Version: 4.15.0-47-generic
Comment 3 Xeno Idaltu 2019-08-20 15:52:35 UTC
I confirm it to be happening on Kubuntu 18.04 LTS
But Muon is flawless on KDE Debian Buster.
Comment 4 mgolden 2020-11-19 19:09:13 UTC
Are people still seeing this? I do not observe this behavior on Kubuntu 20.10 with muon 5.8.0. Could it have been a packaging issue just on Neon?
Comment 5 Bug Janitor Service 2020-12-04 04:34:10 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Stefan Zurucker 2020-12-05 07:20:19 UTC
Contrary to earlier experiences, I do not see this behaviour anymore with Muon 5.8.0 under KDE Neon 5.19.4 (based on Ubuntu 18.04) and 5.20.4 (based on Ubuntu 20.04).
Comment 7 Stefan Zurucker 2020-12-05 10:22:22 UTC
Apologies, I incorrectly set the status to 'reported' when in actuality the bug is most likely gone by now! Therefore setting the status to 'resolved, worksforme'.