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

Events sending beatmap cause main thread to freeze on songs with large thumbnails #80

Open
opl- opened this issue Nov 7, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@opl-
Copy link
Owner

opl- commented Nov 7, 2021

Starting, pausing, and resuming maps for beatmaps with large thumbnails results in a significant lag spike. Reportedly, an example of such a map is buck wild, with a 2500x2500 cover image.

This is most likely due to serialization of the beatmap.songCover property needing to escape the whole string every time.

Potential solutions

  1. Finally make use of the GameStatus object by creating a pool capable of creating a copy of the master on demand, and move JSON serialization off the main thread.
  2. Rescale the cover image to a maximum resolution. This could be a setting in case someone wants the highest resolution possible.
  3. Create a variant of the JSONString class which would cache the escaped string to prevent performing this task multiple times.

Environment

HTTP Status version: v1.19.1 and below

@opl- opl- added the bug Something isn't working label Nov 7, 2021
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