angturil / SongRequestManager

Song Request Manager is an integrated, fully Customizable song request bot and Console for BeatSaber.
GNU Lesser General Public License v3.0
44 stars 33 forks source link

Requests Causes Game To Lag/Studder #11

Closed stormtrooper298 closed 5 years ago

stormtrooper298 commented 5 years ago

First of all, thanks for all of your help and work on this mod!

My viewers and I have noticed that every time someone requests a song in my twitch chat, it causes my game to stutter.

I'm not quite certain what I can upload (logs) to help with this, but what can we do to diagnose the issue and potentially solve it?

Does the mod auto download the songs that are requested? if so, is there a setting to change this somewhere?

I'm running with plenty of resources to spare, so its not like its pushing my rig over the edge.

Thanks in advance.

angturil commented 5 years ago
  1. are you running 1.3.1 or 1.3.2
  2. I've never encountered this, or had this reported/seen on stream before. so never considered this as possible. Its possible that its happening because its a unity coroutine.
  3. Is it a song request or lookup causing the lag? 4.  General system specs. CPU/RAM
  4. Liv, rainbow lights,  You can talk to me on discord angturil@2437. I'm very much interested in this.

    ---------- Original Message ---------- From: stormtrooper298 notifications@github.com Date: April 10, 2019 at 10:06 PM

    First of all, thanks for all of your help and work on this mod! My viewers and I have noticed that every time someone requests a song in my twitch chat, it causes my game to stutter. I'm not quite certain what I can upload (logs) to help with this, but what can we do to diagnose the issue and potentially solve it? I'm running with plenty of resources to spare, so its not like its pushing my rig over the edge. Thanks in advance. —You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.

     

angturil commented 5 years ago

To further clarify, requesting a song does not download it, but does make a request to beatsaver.com for song info. If its 1.3.2, it does do stuff in memory that might actually cause issues if the # of songs is really large (I noticed some lag due to excessive GC with 12000 songs loaded). That's another thing I meant to ask, how many songs do you have loaded in custom songs, and how big is your beatsaver image in task manager? Also , do you have the LocalSearch=on switch if you're running 1.3.2.

I doubt logs will help since most stutter is caused by excessively long coroutine runs or gc.

angturil commented 5 years ago

Datapoint. Ran it against a database with 12000 songs loaded, and issues about 360 non stop song requests. While some periodic GC lag was observed, none of it corresponded to adding songs.

Nonetheless, I added some extra yields to the add co-routine as a precaution.

Also, are you running on an SSD?

stormtrooper298 commented 5 years ago

Awesome reply, let me gather all of the info above and hit you up on discord as well.

Thanks!

stormtrooper298 commented 5 years ago

Well I couldn't replicate the behavior tonight. Perhaps her machine was just having a rough evening... unsure.

For noting though specs are ryzen 2600x @4.0 , 16gb ddr4 @4000 and 1060 GTX 3GB.

About 500 songs loaded.

Ill close this issue out.

Thank you for your prompt reply.

angturil commented 5 years ago

Thanks for updating me.. I did get a chance to investigate possible causes.. and am taking preventative measures in the future to reduce issues. One last question, is the banlist particularly large? 

---------- Original Message ---------- From: stormtrooper298 notifications@github.com Date: April 12, 2019 at 4:51 PM

Closed #11. —You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

 

stormtrooper298 commented 5 years ago

the banlist is empty right now.

Does this mod auto download songs when they're requested? I noticed the behavior sometimes and its exactly on point for when a song is requested via the bot.

yes, SSD and also on a 1080 GTX now rather than 1060

angturil commented 5 years ago

there are no downloads when requested. It just requests the song from beatsaver.com. Its not something that should cause lag... Unless of course the system is already on the edge and would stutter anyway. There is no download (that occurs when you press play, and thus does not affect play). I hate to say it, but I've never observed this happening. I can, and have , made the bot post hundreds of songs in a row to the queue while sehria was playing, and she's ultra sensitive to lag.  There are 3 possible causes I can think of.  Either the heap/gc set is borderline too big. There's a network driver issue. System memory is under heavy load.  You never told me how many songs total you have loaded (it affects the heap/gc set). A very large number could cause hickups. What kind of network setup do you have. Have you ever experienced unusual network related lag. Which version of SRM? I'll try and figure it out with you if you give me more info.

---------- Original Message ---------- From: stormtrooper298 notifications@github.com Date: April 15, 2019 at 8:18 PM

the banlist is empty right now. Does this mod auto download songs when they're requested? I noticed the behavior sometimes and its exactly on point for when a song is requested via the bot. yes, SSD and also on a 1080 GTX now rather than 1060 —You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

 

angturil commented 5 years ago

talk to me on discord if you can, angturil#2437 One more test we can do... song request by # is different from request by name does it matter if its !add 9595 or !add ignite joetastic eir the latter case is a larger network request and does more work. Does doing a !lookup cause the same lag I can probably test it with you by joining your twitch channel and you playing. The stream does NOT need to be running, since I can just submit commands.

---------- Original Message ---------- From: stormtrooper298 notifications@github.com Date: April 15, 2019 at 8:18 PM

the banlist is empty right now. Does this mod auto download songs when they're requested? I noticed the behavior sometimes and its exactly on point for when a song is requested via the bot. yes, SSD and also on a 1080 GTX now rather than 1060 —You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.