Closed ghost closed 6 years ago
I think it's best if you play around with that number.
In main.qml
there's a timer on line 43 that runs to initially load the update list on login or plasma shell restart
I tried 99999
and 999
but I didn't feel any difference.
I can't test it due to the fact my wifi always fails to connect so I just get no internet connection
Your issue is it's calling readUpdates
but locks the thread
I can try playing around with just
killall plasmashell
kstart plasmashell
Though
I know when it starts it gets called twice just from debug logs
But the first call is the issue
You can try kquitapp5 plasmashell; kwrapper5 plasmashell &
from terminal or create custom keyboard shortcut with: kquitapp5 plasmashell; kwrapper5 plasmashell > /dev/null 2>&1 & exit 0
command.
So I figured out the call
when the plasmoid loads the settings emit on "onChange" just from loading. and it calls refresh on change
Please change the following in main.qml
and play around with the timer. 10000msecs seems too long
line 23
onNamesOnlyChanged: timer.restart()
line 24:
onAurSupportChanged: timer.restart()
line 43:
Timer { id: timer interval: 10000 running: true repeat: false onTriggered: refresh() }
It seems that changing line 23 and line 24 cuts the delay in half.
I didn't saw any further differences when changing the timer value.
on my system withtimer.restart()
the plasmashell fully loads before it calls checkupdates
I haven't played around with the timer myself
This is a very...subjective measurement so I'm hoping you can dig a bit deeper before a push a (to the logic) a big(er?) timer interval to master
Honestly https://github.com/I-Dream-in-Code/kde-arch-update-plasmoid/commit/78261a6369eb1962d20db76ba593d4349a7a62c5 satisfies me. I think it can be pushed to master without changes in timer value and this issue can be closed.
my issue is that it now takes 10 seconds to simply call refresh if someone changes names only
or aur support
from settings to deal with this initial loading bug to refresh plasmoid.
So I was hoping for a smaller timer so you can get that "instantaneous update" if you change a setting
So I'm hoping you can find me a minimum
Previously any change in settings will freeze the UI for small time so it's improvement even if you have to wait for actual changes to be effective.
Anyway I tested 1 second (1000) and it works ok. I don't think there is a reason to go lower.
cool just updated master and AUR
When I have plasmoid enabled it significantly delays plasmashell start upon login (I guess it waits until update check is completed). Other plasmoids like weather check don't cause such issues.
Maybe introduce slight delay for checking updates after login so it will trigger after plasmashell is loaded?