UltraStar-Deluxe / Play

Free and open source singing game with song editor for desktop, mobile, and smart TV

Home Page:https://ultrastar-play.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Songlist in companion app not working with huge songlibraries

datWeazel opened this issue · comments

Issue type: Bug report

Actual behaviour

In the companion app the songlist only shows "Something went wrong" (or something along those lines) instead of the songlist.

My current theory is, that it's because I got around 10k songs in my songlibrary.

Expected behaviour

Songlist should show up.

Steps to reproduce

  1. Open UltrastarPlay on PC or whatever
  2. Add a folder to your songlibrary with an insane amount of songs (in my case ~10.000 songs)
  3. Open companion app on your phone.
  4. Try to open the song list
  5. ???
  6. No songlist.

Details

Provide some additional information:

  • UltraStar Play version: 0.9 (latest)
  • Operating System + version: Windows 11
  • if applicable, add a log file

I can add more stuff later after work but I wanted to add the report so I don't forget it again.

I see multiple possible reasons:

  • request / response data too big. But I doub't this is an issue because it is only JSON (no images etc.)
  • Unity struggling to create so many Label elements.
    • At the moment, all song entries are created at once and added to a ScrollView. This has bad performance.
    • Instead, a ListView should be used such that only the elements that are currently visible are instantiated. This is a performance optimization.

This has been fixed for the Steam release by using a dynamically populated ListView.
I tested it with more than 10000 dummy songs. Works like a charm.