Bug 390380 - Elisa consumes higher CPU than Amarok does when playing the same mp3 file
Summary: Elisa consumes higher CPU than Amarok does when playing the same mp3 file
Status: RESOLVED FIXED
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: 0.0.81
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-13 15:33 UTC by CnZhx
Modified: 2018-03-26 19:52 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description CnZhx 2018-02-13 15:33:32 UTC
I am very glad that Elisa is not in the OSS repo of openSUSE Tumbleweed. Thank you all for the good work.

I am not sure whether this worth a bug report. But I notice that when playing the same mp3 file, Elisa takes 8-12% CPU usage while Amarok takes around 2% in my laptop.
Comment 1 Michael D 2018-03-02 16:53:57 UTC
Same problem here except that I am seeing over 20% with elisa and over 20% with kwin_wayland and kwin_x11. If I minimize the window while playing, cpu usage massively drops off in x11 to 2-3%, but not in wayland.
Comment 2 Matthieu Gallien 2018-03-20 07:13:26 UTC
As far as I can say, there seems to be a visible usage coming from the playing indicator (the play icon with animated opacity).

I am looking at that and hope to find a satisfying solution before the 0.1 release.
Comment 3 Matthieu Gallien 2018-03-26 19:33:36 UTC
I have pushed commit:

commit 478cd6ee15b1195592a143d76d325c1091e6d08a (origin/0.1, 0.1)
Author: Matthieu Gallien <matthieu_gallien@yahoo.fr>
Date:   Sun Mar 25 20:38:12 2018 +0200

    no longer have a play icon bouncing but use an icon like the plasma taskbar
    
    Summary:
    no longer have a play icon bouncing but use an icon like the plasma taskbar
    
    We no longer have an animation running when music is playing. We should no longer have excess cpu usage.
    
    We now use a common icon to indicate the playing track (plasma task bar, firefox tabs, ...)
    
    Test Plan: cpu usage should be lower when playing music
    
    Reviewers: #elisa, #vdg, astippich
    
    Reviewed By: #elisa, astippich
    
    Subscribers: romangg, astippich
    
    Differential Revision: https://phabricator.kde.org/D11667


That should fix most visible issues related to extra cpu usage.

Two things have changed:

* the busy indicator when not running may have caused constant refresh of the application window generating cpu usage for elisa and the window manager.

* the play indicator is no longer animated. This should avoid having refresh of the application window when playing music. This is especially important of you do not see the animation.
Comment 4 CnZhx 2018-03-26 19:52:18 UTC
Hi @Matthieu , thanks for the fix.

But I want to ask that is this related to bug #356479 (https://bugs.kde.org/show_bug.cgi?id=356479)? It seems the bug of high cpu with animated icon has already been fixed. Do you know why does it happen to Elisa after the fix?