Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug] 100% client CPU usage on red alert glow animation #8222

Closed
vonox7 opened this issue Apr 26, 2017 · 7 comments
Closed

[Bug] 100% client CPU usage on red alert glow animation #8222

vonox7 opened this issue Apr 26, 2017 · 7 comments
Assignees
Milestone

Comments

@vonox7
Copy link

vonox7 commented Apr 26, 2017

When having an alert, the corresponding panel receives a red heart and glows red in the background. This glow animation consumes 100% desktop CPU load, which is pretty bad.
Expected: Less than 5% CPU load or no animation.

I'm using Grafana v4.1.0 with Influx on Linux. My desktop machine is the latest MacbookPro with the latest Chrome 57.0.2987.133.

@torkelo
Copy link
Member

torkelo commented Apr 26, 2017

@mattttt your animation needs a tweak :)

@mattttt
Copy link
Contributor

mattttt commented Apr 26, 2017

I think I have a solution for this, based on this post: http://tobiasahlin.com/blog/how-to-animate-box-shadow/

Testing now in a branch.

@mattttt
Copy link
Contributor

mattttt commented Apr 26, 2017

While I wasnt able to replicate CPU usage spiking to 100%, I did observe that it did spike a bit (~15-20% on my laptop) and looked for more efficient ways to handle the animation.

Refactored code in PR: #8227

@torkelo torkelo closed this as completed Apr 27, 2017
@torkelo torkelo added this to the 4.3.0 milestone Apr 27, 2017
@torkelo
Copy link
Member

torkelo commented Apr 27, 2017

great, thanks @mattttt for quick fix!

@youurayy
Copy link

Hi, the animation is definitely still taxing, e.g. on laptops (Macbook/Chrome), and on a bigger dashboard page with several open alerts, it adds up and the laptop goes into a full-fan/very-hot mode.

Things go back to normal after adding this CSS (e.g. via the Stylebot extension):

.panel-alert-state--alerting:after {
    -webkit-animation: none;
    animation: none;
    opacity: inherit;
}

... plus I feel I have even better overview of where the alerts are because the red border is now solid.

Perhaps this could make it as an option into future Grafanas -- to have the animation on a user setting, possible to turn on/off (or just remove it entirely).

@youurayy
Copy link

youurayy commented Sep 27, 2019

Grafana signalling an alarm (even in non-foreground tab, Chrome) with a CSS animation, Macbook Pro i9 CPU (top-spec), cca. 2019:

image

*laptop hot and spinning fans loudly

@marefr
Copy link
Contributor

marefr commented Oct 1, 2019

@youurayy thanks for the suggestions. I would recommend you to open a new issue where you can report more detailed information since this issue have been closed for over 2 years.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

5 participants