Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

High CPU Usage with Show Spinner = true #39

Open
1 task done
kenjfox opened this issue Oct 31, 2022 · 0 comments
Open
1 task done

High CPU Usage with Show Spinner = true #39

kenjfox opened this issue Oct 31, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@kenjfox
Copy link

kenjfox commented Oct 31, 2022

Checklist:

  • I updated to the latest version available
  • [X ] I cleared the cache of my browser

Release with the issue:
V1.10.9
Last working release (if known):
N/A
Browser and Operating System:
Chrome 107.0.5304.87 on Ubuntu 22.04
Chromium Browser Version 98.0.4758.141 (Developer Build) Built on Ubuntu 20.04, running on Ubuntu 22.04 (64-bit)

Description of problem:
When focused, dashboard with single slider-button-card causes cpu to run at 24+%, compared with 5-12% for other dashboards. A view with 10 slider-button-cards uses around 40% cpu. I'm pretty new at using Chrome performance tools, but when I record the page just sitting there, it appears that it is repainting when it doesn't need to.
This problem only occurs when the "show_spinner" attribute is set to "true".

image
About every 15ms, it appears the same task is executed:

image

Here's the dashboard yaml:
`title: Vango
views:

  • theme: Backend-selected
    title: Lights Slider
    path: lights-slider
    icon: mdi:light-recessed
    cards:
    • type: custom:slider-button-card
      entity: light.lights_kitchen
      name: Kitchen
      slider:
      direction: left-right
      background: gradient
      use_state_color: true
      use_percentage_bg_opacity: true
      show_track: false
      toggle_on_click: false
      force_square: false
      show_name: true
      show_state: true
      compact: true
      icon:
      show: true
      use_state_color: true
      tap_action:
      action: more-info
      icon: ''
      action_button:
      mode: custom
      icon: mdi:power
      show: true
      show_spinner: true
      tap_action:
      action: toggle
      `

The entity's state hasn't changed, so there shouldn't be any repaints needed.

@kenjfox kenjfox added the bug Something isn't working label Oct 31, 2022
@kenjfox kenjfox changed the title High CPU Usage High CPU Usage with Show Spinner = true Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant