joaorb64 / joaorb64/TournamentStreamHelper

Loading sets from start.gg, and swapping players with a lot of data loaded, makes TSH take way too much CPU time

Open
#614 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug critical
Dominant language
Python
Stars
139
Forks
59
Avg merge
2d 9h
Merged PRs (30d)
6

Description

Basically, TSH might export a LOT of things now when working with start.gg, program_state.json is a huge file, and writing / changing a lot of things in it at once (which happens when loading and swapping) really takes a lot of CPU time. On some computers simply swapping the players sends TSH to 100% CPU Usage, while OBS starts dropping frames until TSH finishes swapping, which takes a few seconds.

Solutions to that would be :

  • Splitting the state JSON into different files (for example : scoreboard (without history) ; match/tournament history / bracket / player list / stream queue )
  • Avoiding complete rewrites when swapping

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by profiling the loading and player-swapping paths while monitoring writes to the large program_state.json file and CPU usage. Compare the current complete rewrites with the proposed split-state approach; done means swapping and loading no longer drive TSH to 100% CPU or cause OBS to drop frames.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.