manatools / dnfdragora

dnfdragora is a dnf frontend based on libyui abstraction
GNU General Public License v3.0
137 stars 41 forks source link

Loading repository info takes too long #187

Open mikhailnov opened 3 years ago

mikhailnov commented 3 years ago

I click on a repository in the list of repos in dnfdragora-gtk and it takes >10 sec to load information about it, sometimes it is loaded quickly, sometimes up to ~30 seconds.

2021-04-04_12-08

mikhailnov commented 3 years ago

Hm, maybe it starts refreshing metadata of the clicked repo?! I clicked "Cancel" in that window and now what I see is a background update of metadata of a repository which is NOT enabled! (This update has already finished probably, UI is not intuitive).

image

anaselli commented 3 years ago

I don't remember if managing repo (recalling just valid for the dnfdragora open session) is completely asynched... though what you see is what dnf-daemon sent after you pressed ok or cancel. But i see what happend and have to check. if you selected something and then press cancel repo updates starts anyway... i think this is a good catch :)

anaselli commented 3 years ago

Need to check it better but according to log:

2021-04-04 12:29:50,342 [dnfdragora.dialogs]{dialogs.py:706}(DEBUG) {'bandwidth': 0, 'basecachedir': '/var/cache/dnf', 'baseurl': [], 'cost': 1000, 'deltarpm': True, 'deltarpm_percentage': 75, 'enabled': False, 'enabled_metadata': '', 'enablegroups': True, 'exclude': [], 'excludepkgs': [], 'failovermethod': 'priority', 'fastestmirror': True, 'gpgcheck': True, 'gpgkey': ['file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Mageia'], 'includepkgs': [], 'ip_resolve': 'whatever', 'max_parallel_downloads': 3, 'mediaid': '', 'metadata_expire': 172800, 'metalink': None, 'minrate': 1000, 'mirrorlist': 'https://www.mageia.org/mirrorlist/?release=8&arch=x86_64&section=nonfree&repo=backports_testing&source=1', 'name': 'Mageia 8 - x86_64 - Nonfree - Test Backports - Source', 'password': '', 'priority': 99, 'protected_packages': ['dnf', 'dnf', 'yum', 'basesystem-minimal', 'basesystem', 'dnf', 'yum', 'basesystem-minimal', 'basesystem'], 'proxy': '', 'proxy_password': None, 'proxy_username': None, 'repo_gpgcheck': False, 'retries': 10, 'skip_if_unavailable': True, 'sslcacert': '', 'sslclientcert': '', 'sslclientkey': '', 'sslverify': True, 'throttle': 0.0, 'timeout': 30, 'type': '', 'username': '', 'size': 0, 'packages': 0}
2021-04-04 12:29:55,284 [dnfdragora.ui]{ui.py:1850}(DEBUG) Event received OnRepoMetaDataProgress - status DNFDragoraStatus.RUNNING
2021-04-04 12:29:55,284 [dnfdragora.ui]{ui.py:1581}(DEBUG) OnRepoMetaDataProgress: ('Mageia 8 - x86_64 - Nonfree - Test Backports - Source', 0.0)
2021-04-04 12:29:55,484 [dnfdragora.ui]{ui.py:1850}(DEBUG) Event received OnRepoMetaDataProgress - status DNFDragoraStatus.RUNNING
2021-04-04 12:29:55,484 [dnfdragora.ui]{ui.py:1581}(DEBUG) OnRepoMetaDataProgress: ('Mageia 8 - x86_64 - Nonfree - Test Backports - Source', 1.0)
2021-04-04 12:29:55,685 [dnfdragora.ui]{ui.py:1850}(DEBUG) Event received OnRepoMetaDataProgress - status DNFDragoraStatus.RUNNING
2021-04-04 12:29:55,685 [dnfdragora.ui]{ui.py:1581}(DEBUG) OnRepoMetaDataProgress: ('Mageia 8 - x86_64 - Nonfree - Test Backports - Source', 1.0)

It seems that you selected a repository that had no metadata and when you did that to show info metadata were refreshed for that repo. if you try to do it later should not happen again. Unfortunately only main dialogs here subscribed that event so is shown only later, Of course the bat should be cleaned later and not remain at 100%... At the end I don't think it's a bug except last comment of mine.

mikhailnov commented 3 years ago

Yes, that repo (i686 source on screenshot above) did not have metadata. But clicking on repos that do have metadata takes 5-15 seconds to load information, is not that too long?

mikhailnov commented 3 years ago

But not always. Most of the time it is fast. I can't understand what it depends from. Seems that it depends on the size of metadata or something else like that. Taking repos on the screenshot bellow: image the small ones are opened very quickly, bigger repos are openned slower, debuginfo is the slowest.

anaselli commented 3 years ago

Don't know either... progress metadata info sent by dnfdaemon is here and all are name and frac (percentage as a double from 0.0 to 1.0). I probably need to add a progress bar in that dialog too

papoteur-mga commented 3 years ago

Should be solved with pr#192 and pr#193 There is still the question of the progress bar.