First Last Prev Next    No search results available
Details
: High CPU usage (>40%) by "Renew License" button
Bug#: 26644
: QuickFolders
: General
Status: RESOLVED
Resolution: FIXED
: PC
: Windows NT
: unspecified
: P2
: normal
: ---

:
:
:
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Axel Grude <axel.grude@gmail.com>
Assigned To: Axel Grude <axel.grude@gmail.com>
:

Attachments
Renew License button (7.17 KB, image/png)
2019-02-22 14:12, Tom Metro
no flags Details
4.13.2 prerelease 3 (986.77 KB, application/x-xpinstall)
2019-02-23 07:22, Axel Grude
no flags Details
4.13.2 prerelease 31 (987.61 KB, application/x-xpinstall)
2019-02-24 13:57, Axel Grude
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2019-02-22 13:20
Apparently on Linux system the Animation on the Renewal button (pulsing
box-shadow) is taking up a lot of CPU on a users system system (>40%);

he discovered that when he hovers the mouse over that button, causing the
animation to stop, the CPU use plummets (~6%).
------- Comment #1 From Tom Metro 2019-02-22 14:12:08 -------
Created an attachment (id=8595) [details]
Renew License button

>Can you please provide a screenshot so I know where exactly?
Attached.


> (top left of the QF toolbar or a notification at the bottom?)
Top left of the QF toolbar.
------- Comment #2 From Tom Metro 2019-02-22 14:15:23 -------
>It may be a Linux specific issue (maybe affect Linux where there are no optimized 3d drivers).
Could be.

>I just want my users to be able to see the button without outright using "blinking" if you know what I mean.
Yup.

>It's important that I keep fundraising...
Understood. I wasn't suggesting elimination.

>I will look into replacing it with something else.
Sounds good.

>A simple animation shouldn't take up CPU like this.
Agreed.
------- Comment #3 From Axel Grude 2019-02-23 07:22:20 -------
Created an attachment (id=8597) [details]
4.13.2 prerelease 3

Test version, with different animation.

Here is an interesting article on how keyframes in CSS3 give 40% CPU usage:

https://stackoverflow.com/questions/13176746/css-keyframe-animation-cpu-usage-is-high-should-it-be-this-way/13293044

I will add a test version with a different animation (using opacity, please
test whether it does anything) - also using the translateZ hack - it may or may
not be applicable to the Thunderbird CSS rendering engine.

note there is a 60s delay before it starts, so please check whether (and by how
much) CPU usage goes up 1 min after restarting Thunderbird.

IMPORTANT: IN this version, I removed some Asian locales because there is a
limit to attachment size on mozdev.org. This test version won't fully work in
Japanese, Chinese , Vietnamese locales.
------- Comment #4 From Axel Grude 2019-02-23 07:49:14 -------
one problem I didn't think of: there is another tiny animation in the options
menu (click the blue cogwheel to see it at the bottom)

I am not sure whether this has any effect when the menu isn't used or whether
it impacts performance right away? Also does the CPU boost go way when the menu
is hidden again?
------- Comment #5 From Axel Grude 2019-02-23 12:42:51 -------
(In reply to comment #4)
> one problem I didn't think of: there is another tiny animation in the options
> menu (click the blue cogwheel to see it at the bottom)
> 
> I am not sure whether this has any effect when the menu isn't used or whether
> it impacts performance right away? Also does the CPU boost go way when the menu
> is hidden again?
> 

Also I still am havin problems with making the platform specific (linux only)
rules work. I resurreceted my ubuntu 16 Virtualbox VM and realised that none of
the platform specific rules currently are loaded. Spent a few hours on this
scratching my head...
------- Comment #6 From Tom Metro 2019-02-24 00:22:36 -------
>test version with a different animation
Sorry, it's essentially the same.

I was seeing 35 - 38% under some circumstances, but then a few minutes later I
was seeing 40% +/-2%.

(When I first went to test the prerelease version, I couldn't get CPU usage to
drop even when I stopped the animation. I tried disabling QF as a sanity check,
verifying CPU dropped, and validating QF as the cause. Then I discovered that I
could get it to drop once I closed the "what new" HTML page that QF opens in a
tab upon a new version install. I gather that page has some CSS animations
too.)

>tiny animation in the options menu
Showing the menu essentially had no effect. Under some circumstances opening
the menu caused a few percentage increase, and in other circumstances a few
percentage decrease.

(In all cases I watched the CPU usage of TB over the span of a few minutes to
see how it averaged out, and I shut down or suspended other processes on the
system that were or might be using notable amounts of CPU.)
------- Comment #7 From Axel Grude 2019-02-24 01:41:53 -------
(In reply to comment #6)
> >test version with a different animation
> Sorry, it's essentially the same.
> 
> I was seeing 35 - 38% under some circumstances, but then a few minutes later I
> was seeing 40% +/-2%.
> 
I got about 15% CPU (without the update tab showing) - this is in a Ubuntu
Virtual Machine which may well be supporting graphics acceleeration. Which
version of Linux are you running?

My main problem is currently specifying platform specific rules using the
"platform" and "os" modifiers in my install manifest for a content path
pointing to different CSS files - it doesn't appear to work (anymore?)

could be a deprecation in the Mozilla codebase that broke this stuff. I am on
the road most of today but I will try some different way again next week. If
all else fails, I will try to load the CSS using JavaScript because at least
there I am able to determine the Operating System reliably.
------- Comment #8 From Axel Grude 2019-02-24 13:57:31 -------
Created an attachment (id=8598) [details]
4.13.2 prerelease 31

I found a way to load the styles dynamically. Unforunately I wasn't able to
actually load the xpi in my Ubuntu as a file (might be a permissions problem
with my shared folder) - it says "This add-on could not be installed because it
appeears to be corrupt" - still hoping I might be able to install it in the VM
if I download it from here. It does install in Windows and loads platform
specific CSS. (A different simpler animation for the renew button, and no
animation for the animated options menu item)
------- Comment #9 From Axel Grude 2019-02-24 14:06:30 -------
(In reply to comment #8)
> Created an attachment (id=8598) [details] [details]
> 4.13.2 prerelease 31
> 
> I found a way to load the styles dynamically. Unforunately I wasn't able to
> actually load the xpi in my Ubuntu as a file (might be a permissions problem
> with my shared folder) - it says "This add-on could not be installed because it
> appeears to be corrupt" - still hoping I might be able to install it in the VM
> if I download it from here. It does install in Windows and loads platform
> specific CSS. (A different simpler animation for the renew button, and no
> animation for the animated options menu item)
> 

I managed to install the new version from here in Linux and it appears to make
a difference. The new animation changes opacity instead of animating
box-shadow. CPU drops from 15% to 2%, so I hope it makes a difference on other
systems, too. Note this will only affect Linux systems. I am loading different
styles in Windows / Mac.
------- Comment #10 From Axel Grude 2019-02-25 14:18:18 -------
Resolve FIXED with Release 4.13.2 at 25/02/2019

note - on Linux you may have to CLOSE version history tab for lower CPU
consumption.
------- Comment #11 From Tom Metro 2019-03-01 14:08:22 -------
>Resolve FIXED with Release 4.13.2 at 25/02/2019
I've been busy elsewhere, but noticed yesterday that the CPU usage had dropped
and the animation looked different. Apparently TB auto-updated the extension.

>The new animation changes opacity instead of animating box-shadow. CPU drops
>from 15% to 2%, so I hope it makes a difference...
Yes, that seems to have done it. I'm seeing <10% use generally, and around 6%
much of the time, which if I recall was the baseline that I'd see when Quick
Folders was disabled.

Thank you for addressing this.
------- Comment #12 From Tom Metro 2020-05-30 14:25:57 -------
I thought we had resolved this, but coincident with the "renew license" button
reappearing recently the fan has been running more on my laptop.

TB itself is still only running at about 7-8% CPU, but the desktop (Cinnamon)
seems to be sustaining mid-20%. So it would appear that the side effect of the
animation is to drive up the CPU in other display-related processs.

Within 60 seconds of exiting TB the fan winds down and the desktop CPU usage
drops below 8%.

First Last Prev Next    No search results available