Bug 421540 - [kcm/kwinrules X11] KWinRules KCM Redesign: Fallout: Slow loading
Summary: [kcm/kwinrules X11] KWinRules KCM Redesign: Fallout: Slow loading
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: rules (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-15 01:20 UTC by Duncan
Modified: 2020-06-13 18:03 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan 2020-05-15 01:20:37 UTC
+++ This bug was initially created as a clone of Bug #421055 +++
[Frameworks/plasma git-master, so this is the redesigned window rules kcm.  qt-5.15.0_rc ]

Testing the above bug I loaded, changed and reloaded the new window-rules kcm quite a bit, and noticed that sometimes (but not always) it takes /much/ longer than it should to load up, sometimes 30+ seconds.  It's as if it's waiting for a timeout, perhaps on a dbus call, before loading.

In my testing, it seems not to happen on the first load (which loads at pretty normal speed, perhaps a slight pause loading the rules kcm), but I was changing some window rule, applying, then clicking to some other KCM and back to see if my change "took".  I'm not sure if it /always/ takes longer on later reloads or not (if it loads normally I'd not notice it), but it certainly does sometimes.  If I entirely close the plasma systemsettings window and restart it instead of simply clicking to a different kcm and back, the window-rules kcm seems to load faster again.

When it slow-loads, for some tens of seconds it continues to display the previous kcm, to the point I think it missed my click or something (I timed it once and it was over 30 seconds "frozen" on the previous kcm, before even loading the rules kcm).  Then, finally, it'll load the rules kcm, but it says empty, no rules, for some tens of seconds longer, which of course triggered quite some panic the first time I saw it and still causes my heart to jump into my throat, as I've something like 50 rules which I think I just lost!  (I could retrieve them from backup if I had to, but it still triggers that heart-in-throat moment!)  Finally, it actually loads the rules list, and my heart quits racing and I can breath again!

As you can imagine this is quite irritating.  I know I'm on live-git so can live with it for the time being, but I'd seriously /hate/ to see it released like this.  Because it happens on a reload of the rules kcm it's obviously hot-cache so it's not waiting on disk (besides I'm on a reasonably fast ssd so it'd hardly be 30+ seconds waiting on disk even from cold-cache, unless it's loading on the order of gigs of something), but it's obviously waiting on /something/, thus the dbus timeout hypothesis above, as I've actually seen that one elsewhere.
Comment 1 Duncan 2020-05-15 02:11:04 UTC
Once at the rule list, both add new, and loading an existing rule in the editor, can take more time than they should as well.  I'm not sure it always does, but I'm definitely noticing it as I work in the kcm to file these related bugs.
Comment 2 carl 2020-05-15 07:43:22 UTC
I can reproduce this bug with > 10 rules it takes a few more seconds than normal to load and it only happens when switching kcms.
Comment 3 Duncan 2020-06-13 18:03:43 UTC
This appears to be fixed now; speed back to normal. =:^)

I believe e307038f8 was the fix, tho it only referred to slow scrolling.  But the slow loading seems to be fixed now too.  Thanks!