youtube-music: [Bug]: High CPU Usage

Preflight Checklist

  • I use the latest version of YouTube Music (Application).
  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.
  • I understand that th-ch/youtube-music has NO affiliation with Google or YouTube

YouTube Music (Application) Version

3.8.0

Checklists

What operating system are you using?

macOS

Operating System Version

macOS 15.3.2

What CPU architecture are you using?

arm64 (including Apple Silicon)

Last Known Working YouTube Music (Application) version

3.7.0

Reproduction steps

  • YT Music has started freezing after update from 3.7.0 to 3.8.0
  • The top command shows high resource usage
PID    COMMAND      %CPU  TIME     #TH    #WQ  #PORT MEM    PURG   CMPRS  PGRP  PPID  STATE    BOOSTS            %CPU_ME %CPU_OTHRS UID  FAULTS     COW      MSGSENT    MSGRECV    SYSBSD      SYSMACH
29225  YouTube Musi 101.6 29:24.54 28/1   1    302-  624M+  0B     210M-  29178 29178 running  *13-[15513+]      0.00000 0.00000    504  1497550+   23650+   2493640+   1167147+   8279524+    4908977+

Due to this even basic functions like play/ pause are taking minutes making it unusable. I’ve disabled almost all the plugins. The enabled plugins are :

Image

Expected Behavior

YT Music should not consume these many resources and work lag free.

Actual Behavior

App freezes

Enabled plugins

Added above

Additional Information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 19

Commits related to this issue

Most upvoted comments

The CPU is still high with Adblock disabled on 3.8.0

PID    COMMAND      %CPU  TIME     #TH    #WQ  #PORT MEM    PURG   CMPRS  PGRP  PPID  STATE    BOOSTS            %CPU_ME %CPU_OTHRS UID  FAULTS     COW      MSGSENT    MSGRECV    SYSBSD      SYSMACH
77849  YouTube Musi 102.5 00:15.16 43/1   5    499   149M+  32K    0B     77849 1     running  *199+[10]         0.00000 0.00000    504  69189+     760+     77387+     37685+     142734+     69624+

On 3.7.5 (without adblock), The startup load is high for a minute and then settles to <20% load

PID    COMMAND      %CPU  TIME     #TH    #WQ  #PORT MEM    PURG   CMPRS  PGRP  PPID  STATE    BOOSTS            %CPU_ME %CPU_OTHRS UID  FAULTS     COW      MSGSENT    MSGRECV    SYSBSD      SYSMACH
77849  YouTube Musi 104.6 00:12.67 44/1   9    500   146M+  32K    0B     77849 1     running  *13-[10+]         0.00000 0.00000    504  64915+     756      73300+     35614+     128112+     65681+

77849  YouTube Musi 102.5 00:15.16 43/1   5    499   149M+  32K    0B     77849 1     running  *199+[10]         0.00000 0.00000    504  69189+     760+     77387+     37685+     142734+     69624+

78733  YouTube Musi 113.8 00:19.99 25/2   1    208+  204M+  0B     0B     78643 78643 running  *845+[4]          0.00000 0.00000    504  99719+     564       75933+     37418+     136735+     47635+

78733  YouTube Musi 46.6  00:57.26 30     1    294-  476M+  0B     11M    78643 78643 sleeping *0[912+]           0.00000 0.00000    504  288830+    2034+     147361+    70547+     312975+     131030+

78733  YouTube Musi 12.2  00:57.40 30     1    294   476M+  0B     11M    78643 78643 sleeping *0[933+]           0.00000 0.00000    504  288895+    2040+     147626+    70612+     314440+     131606+

78733  YouTube Musi 17.5  00:57.78 30     1    294   477M+  0B     11M    78643 78643 sleeping *0[1022+]          0.00000 0.00000    504  289765+    2049+     148284+    70833+     317921+     133096+

78733  YouTube Musi 13.2  00:58.09 30/2   1    294   477M+  0B     11M    78643 78643 running  *0[1040+]          0.00000 0.00000    504  289855+    2055+     148632+    70888+     320942+     133976+

78733  YouTube Musi 27.1  00:59.84 30     1    294   449M+  0B     11M    78643 78643 sleeping *0[1122+]          0.00000 0.00000    504  293981+    2068+     153742+    73099+     336380+     141050+

Similar behaviour with adblocker enabled on 3.7.5.

PID    COMMAND      %CPU  TIME     #TH    #WQ  #PORT MEM    PURG   CMPRS  PGRP  PPID  STATE    BOOSTS             %CPU_ME %CPU_OTHRS UID  FAULTS     COW       MSGSENT    MSGRECV    SYSBSD      SYSMACH
79791  YouTube Musi 106.0 00:16.00 40/1   4    488+  142M+  32K    0B     79791 1     running  *27[5]             0.00000 0.00000    504  60354+     752       74993+     35799+     137792+     69210+
680

PID    COMMAND      %CPU  TIME     #TH    #WQ  #PORT MEM    PURG   CMPRS  PGRP  PPID  STATE    BOOSTS             %CPU_ME %CPU_OTHRS UID  FAULTS     COW       MSGSENT    MSGRECV    SYSBSD      SYSMACH
79824  YouTube Musi 133.5 00:31.41 26/2   1    250   436M+  0B     0B     79791 79791 running  *10-[4+]           0.42298 0.00000    504  209680+    657+      99873+     49094+     172691+     69070+

PID    COMMAND      %CPU  TIME     #TH    #WQ  #PORT MEM    PURG   CMPRS  PGRP  PPID  STATE    BOOSTS             %CPU_ME %CPU_OTHRS UID  FAULTS     COW       MSGSENT    MSGRECV    SYSBSD      SYSMACH
79824  YouTube Musi 106.5 00:33.95 27/1   1    270-  441M+  0B     0B     79791 79791 running  *108[7]            0.00000 0.00000    504  211766+    658       103775+    51056+     186978+     72469+

PID    COMMAND      %CPU  TIME     #TH    #WQ  #PORT MEM    PURG   CMPRS  PGRP  PPID  STATE    BOOSTS             %CPU_ME %CPU_OTHRS UID  FAULTS     COW       MSGSENT    MSGRECV    SYSBSD      SYSMACH
79824  YouTube Musi 22.9  00:38.86 27/1   1    271   401M+  0B     0B     79791 79791 running  *0[286+]           0.00000 0.00000    504  219486+    660       111357+    54455+     213814+     81370+

Still reproducible in v3.8.1?

yes, i think it might be a bit better but i’m not sure. it took ~10min from clicking the application to it opening and loading the screen + songs. it’ll randomly pause in the songs it’s playing and take a bit to transition from one song to the other (but might be a bit shorter than in v3.8.0). clicking buttons to navigates takes like 30 seconds but it eventually loads.

The same is happening to me with 3.8.0 on Mac

It works fine on 3.7.5

On M1 pro it is super slow. All the plugins is turned off. Previous version had no such issue until upgrade, I’ve tried to install it back but unfortunately it don’t play anything anymore. I’ve tried to compile from master, but it fails.