twitch-tui icon indicating copy to clipboard operation
twitch-tui copied to clipboard

High CPU usage

Open aravinat21 opened this issue 1 year ago • 9 comments

Describe the bug: High CPU usage

To Reproduce: twt

Expected behavior: low CPU

Screenshots: TBD

System:

  • Twitch-tui version:1.6.0

  • Operating System:5.18.12-artix-1

  • Terminal:st

  • Shell:zsh

Add any other context about the problem here. Issue is not consistent

aravinat21 avatar Jul 25 '22 06:07 aravinat21

Thank you for the issue! This issue will be addressed in a reasonable amount of time.

github-actions[bot] avatar Jul 25 '22 06:07 github-actions[bot]

Hello,

Could you specifically define what you'd like to see as low CPU usage, and what numbers you're seeing with high CPU usage?

This might be solved in one of the alphas that is currently under development for v2.0.

Thanks!

Xithrius avatar Jul 25 '22 07:07 Xithrius

Close to 100% out of 400% which I thought should be unusual.

On Mon, 25 Jul 2022, 10:37 Xithrius, @.***> wrote:

Hello,

Could you define "high cpu usage", in your case?

This might be solved in one of the alphas that is currently under development for v2.0.

— Reply to this email directly, view it on GitHub https://github.com/Xithrius/twitch-tui/issues/182#issuecomment-1193691224, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWXHMES7PLBDUMQEBWT3DWLVVY74DANCNFSM54RESTBA . You are receiving this because you authored the thread.Message ID: @.***>

aravinat21 avatar Jul 25 '22 10:07 aravinat21

This is definitely unusual, I'm currently still unable to reproduce.

Does this happen usually at launch or when the application is running for a while?

Are you able to connect and see messages before or after the CPU spikes?

Did you modify the tick rate to be very low, instead of the default 30? Does raising it to a higher number perhaps solve your current problem?

Could you paste your config (without your token) as well?

Xithrius avatar Jul 25 '22 17:07 Xithrius

I could not reproduce it again either. Maybe it's just a onetime thing.

Noticed it after about an hour of usage. Then restarted and it was still using 100% of CPU.

not applicable (it was a channel with zero viewers)

No. It did not solve it. I raised it to 1000 (ms). Maybe it did solve the issue. I will put it to test again.

[twitch]
# Your username on Twitch.
username = "aravinat21"
# The streamer's name.
channel = "aravinat21" # A channel with 0 viewers
# The IRC channel you'd like to connect to.
server = "irc.chat.twitch.tv"
# OAuth token that authenticates you into Twitch. Acquired through https://twitchapps.com/tmi/.
token = ""

[terminal]
# The delay in milliseconds between terminal updates.
tick_delay = 1000
# The maximum amount of messages to be stored.
maximum_messages = 150
# The file path to log to.
log_file = ""

[storage]
# If previous channels switched to should be tracked.
channels = true
# If previous username mentions should be tracked.
mentions = true

[filters]
# If filters should be enabled at all.
enabled = false
# If the regex filters should be reversed.
reversed = false

[frontend]
# If the time and date is to be shown.
date_shown = true
# The format of the date and time outputs. Formats can be found at https://strftime.org/.
date_format = "%a %b %e %T %Y"
# The longest a username can be.
maximum_username_length = 26
# Which side the username should be aligned to.
username_alignment = "right"
# The color palette for the username column: pastel (default), vibrant, warm, cool.
palette = "pastel"
# Show title with time and channel.
title_shown = true
# Show padding around chat frame.
padding = true
# Show twitch badges next to usernames.
badges = true

aravinat21 avatar Jul 26 '22 21:07 aravinat21

I haven't done lengthy tests in a while, so I'll definitely check this out.

However, my previous tests yielded no such results.

I'll be sure to be on the lookout for this, and if it does come up, I'll reopen this issue.

Xithrius avatar Jul 26 '22 21:07 Xithrius

To Reproduce:

  • start twt
  • network change (connect to a VPN or change WiFi, etc...)
  • send some messages and wait (optional.. or not)

Screenshot

aravinat21 avatar Jul 27 '22 08:07 aravinat21

Sorry, but I'm unable to reproduce this problem, even on different machines.

I'll continue to do testing, and keeping an eye out for anomalies like this. As of now I am unable to solve this issue.

Xithrius avatar Aug 17 '22 22:08 Xithrius

Do you think you could run https://github.com/brendangregg/FlameGraph on your system to see if anything wack happens?

Thanks!

Xithrius avatar Sep 16 '22 06:09 Xithrius

I'll be closing this for now. If you're able to measure the problem on your computer, feel free to re-open this issue.

Xithrius avatar Oct 22 '22 06:10 Xithrius