Bug 301460 - Switching activities became really slow
Summary: Switching activities became really slow
Status: RESOLVED FIXED
Alias: None
Product: kactivitymanagerd
Classification: Plasma
Component: general (show other bugs)
Version: 4.8.80 (beta1)
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Ivan Čukić
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-06-08 16:46 UTC by Rolf Eike Beer
Modified: 2012-08-06 09:39 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.9


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rolf Eike Beer 2012-06-08 16:46:01 UTC
I have 2 activities, 10 virtual desktops and usually 5 or 6 applications per activity. Since the upgrade to 4.9b1 switching activities became extremely sluggish. On my Core i7 system it takes some ~1 second when then system is idle and ~5 seconds when the system is busy (make -j 10). With 4.8.3 even when the system was busy switching activities was well below one second.

Reproducible: Always
Comment 1 David E. Narvaez 2012-06-19 12:20:04 UTC
Ivan, glancing through the code of the activity service, I see there's much added around jobs and some lines about activity encryption. Do you think this could be the cause of the delay? Or is there some performance tuning we need to figure out?
Comment 2 Ivan Čukić 2012-06-19 12:51:11 UTC
Encryption is not the problem - if you don't use it, it shouldn't slow things down.

There is one thing to try - fire up konsole set it to show on all activities, kill plasma (kquitapp plasma-desktop) and do this:

for activity in `qdbus org.kde.ActivityManager /ActivityManager ListActivities`; do
   qdbus org.kde.ActivityManager /ActivityManager SetCurrentActivity "$activity";   
done

If it switches slowly, then the issue is in kamd, not plasma

The next step would be to remove the part of the code related to virtual desktop switching

service/ActivityManager.cpp
433:            KWindowSystem::setCurrentDesktop(desktopId);

And test again. I don't really like kamd managing this - needs to wait for kwin and stuff...
Comment 3 Rolf Eike Beer 2012-06-19 14:36:20 UTC
> If it switches slowly, then the issue is in kamd, not plasma

There is no difference in speed with and without plasma-desktop.
Comment 4 Marco Martin 2012-06-25 09:35:49 UTC
seems fine here.
are you sure you have only 2 activities and not many stopped ones too? (visible from the explorer but not from activitybar)
Comment 5 Rolf Eike Beer 2012-06-25 13:13:56 UTC
There are really only 2.
Comment 6 Ivan Čukić 2012-07-03 08:56:14 UTC
Can you create ~/.kde/share/config/activitymanager-pluginsrc and put the following in it:

[Global]
disabledPlugins=activitymanager_plugin_activityranking

Restart kactivitymanagerd (best way to log out, and back in) and check whether the speed has improved. It is the only place where I can see potential for slowness, which will be moved into a separate thread for KAMD 3 (KDE SC 4.10).
Comment 7 Rolf Eike Beer 2012-07-03 10:52:36 UTC
Created the file, restarted kactivitymanagerd, everything smooth again.
Comment 8 Ivan Čukić 2012-07-03 11:56:20 UTC
I've disabled the plugin in question (removed from the build) for 4.9 since it is only used in plasma active. For 4.10 it will have its own thread to go wild in.

If you have installed the previous version from source, you'll need to remove the lingering plugin files.
Comment 9 Blackpaw 2012-07-07 01:03:50 UTC
Ran into the same problem with the same setup - comment 6 helped.

Thanks - Lindsay