Bug 399341 - all backends + no internet = GUI update blocked for literal seconds
Summary: all backends + no internet = GUI update blocked for literal seconds
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-03 16:06 UTC by Harald Sitter
Modified: 2018-10-10 23:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
bt (NB: this was of two runs, both stuck in fwupd it seems) (20.96 KB, text/plain)
2018-10-03 16:06 UTC, Harald Sitter
Details
cli output (10.06 KB, text/plain)
2018-10-03 16:14 UTC, Harald Sitter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Sitter 2018-10-03 16:06:07 UTC
Created attachment 115387 [details]
bt (NB: this was of two runs, both stuck in fwupd it seems)

On master when all backends are installed but no internet connection is available discover will consistently get blocked on UI updates for numerous seconds. After  a while it will unlock to show network errors.


STEPS TO REPRODUCE
1. Have no internets
2. reboot (does not happen after discover was started once it seems)
3. start discover

OBSERVED RESULT

discover fails to draw the UI for multiple seconds 

EXPECTED RESULT

discover should be fully drawn/redraw and be interactive while it's waiting for backend results


SOFTWARE VERSIONS
(available in About System)
KDE Plasma Version: master 
KDE Frameworks Version: master
Qt Version: 5.11.1

ADDITIONAL INFORMATION

I've tried with various backend combinations to trigger the issue, while each backend has a marginal "Freeze" portion early on only the complete combo of packagekit,fwupd,snap,kns,flatpak seems to actually cause the freeze to last multiple seconds.

I've ran this in gdb and the main thread seems to be executing fwupd stuff at the time the UI is stuck, why the fwupd stuff suddenly takes longer with a full backend lineup versus just fwupd is anyone's guess though.
Comment 1 Harald Sitter 2018-10-03 16:14:39 UTC
Created attachment 115388 [details]
cli output
Comment 2 Aleix Pol 2018-10-10 23:51:37 UTC
Git commit 2623dae7b9ff2f89887f8e9a5f3268a5a57deedd by Aleix Pol.
Committed on 10/10/2018 at 23:49.
Pushed by apol into branch 'Plasma/5.14'.

fwupd: move blocking dbus call into the initialization thread

M  +23   -33   libdiscover/backends/FwupdBackend/FwupdBackend.cpp
M  +5    -10   libdiscover/backends/FwupdBackend/FwupdBackend.h

https://commits.kde.org/discover/2623dae7b9ff2f89887f8e9a5f3268a5a57deedd