Hitching info/FYI

Discussion in 'General Discussion' started by Echondas, Oct 14, 2017.

Thread Status:
Not open for further replies.
  1. Echondas

    Echondas Bug Hunter Bug Moderator

    Messages:
    3,785
    Likes Received:
    4,001
    Trophy Points:
    165
    Gender:
    Male
    Location:
    NY
    Not sure if it's helpful, but I've noticed most of the hitching seems to be related to audio (music, sfx triggering)..

    However, when streaming a radio station using the Portable Aether Vibration Amplifier, there is no hitching when changing scenes, loading, or anywhere that I've noticed..

    Maybe that will help clue in to some of the major sources? Secret sauce?
     
    Last edited: Oct 14, 2017
  2. StrangerDiamond

    StrangerDiamond Avatar

    Messages:
    4,355
    Likes Received:
    4,999
    Trophy Points:
    153
    Would seem sensible to add the SFX in a custom thread like the amplifier and musical instruments... I bet stock unity parameters use the same threads, so switching when the VFX already overloads memory could indeed amplify the hitching problem.
     
    Leelu likes this.
  3. StrangerDiamond

    StrangerDiamond Avatar

    Messages:
    4,355
    Likes Received:
    4,999
    Trophy Points:
    153
    @Echondas I would also post this bit into the bug/feedback forum, just to make sure its noted as part of a possible known issue.
     
  4. Echondas

    Echondas Bug Hunter Bug Moderator

    Messages:
    3,785
    Likes Received:
    4,001
    Trophy Points:
    165
    Gender:
    Male
    Location:
    NY
    Well, it's just a theory at this point.. I'll mention @Lexie here though, so she notices it :)
     
    Ahuaeynjgkxs likes this.
  5. Alley Oop

    Alley Oop Bug Hunter Bug Moderator

    Messages:
    15,747
    Likes Received:
    19,501
    Trophy Points:
    153
  6. Echondas

    Echondas Bug Hunter Bug Moderator

    Messages:
    3,785
    Likes Received:
    4,001
    Trophy Points:
    165
    Gender:
    Male
    Location:
    NY
    @Alley Oop Hey - while I'll be... that seems to have helped slightly..

    I disabled my onboard sound device in Windows device manager, and am just using the NVIDIA HD Audio device output to my TV - and the audio/music hitching is slightly improved.. still happening tho.
     
    Last edited: Oct 15, 2017
  7. Elwyn

    Elwyn Avatar

    Messages:
    3,619
    Likes Received:
    4,784
    Trophy Points:
    153
    Gender:
    Male
    Location:
    San Antonio, TX
    Audio is the symptom, not the cause. The entire game is frozen during hitching (I've seen that one CPU core spikes to 100% and the rest to 0%), and the stuttering is what you get when even the sound code stops running. It is constantly racing a few milliseconds ahead of the OS sound drivers.

    But it is certainly less annoying if you turn off your background music.
     
  8. Lazlo

    Lazlo Avatar

    Messages:
    1,498
    Likes Received:
    3,225
    Trophy Points:
    113
    Sorry if it's a dumb question, but is there any way to completely disable SotA's sound instead of disabling hardware? I've played some games before where this was possible from a config file even though it couldn't be done from the game ui.

    edit: Apparently there is a -nosound launch option in Steam that works, but I have no idea if that's helpful at all beyond muting.
     
    Last edited: Oct 16, 2017
    Echondas likes this.
  9. Browncoat Jayson

    Browncoat Jayson Legend of the Hearth

    Messages:
    6,334
    Likes Received:
    14,098
    Trophy Points:
    153
    It looks like the Steam option catches the audio in the Steam wrapper and mutes it, but doesn't actually disable audio. I looked through the Unity command line arguments, and I dont see one built-in that would disable sound, so the devs would need to write it themselves to allow for that.
     
    Ahuaeynjgkxs, Cordelayne and Lazlo like this.
  10. Alley Oop

    Alley Oop Bug Hunter Bug Moderator

    Messages:
    15,747
    Likes Received:
    19,501
    Trophy Points:
    153
    huh. wasn't actually a suggestion, just pointing out that there have been previous reports of hitching tied to audio, but if it worked for you...
     
    Ahuaeynjgkxs likes this.
  11. Echondas

    Echondas Bug Hunter Bug Moderator

    Messages:
    3,785
    Likes Received:
    4,001
    Trophy Points:
    165
    Gender:
    Male
    Location:
    NY
    @Alley Oop Ah.. gotcha :) SO yeah - I guess it's already known to investigate the audio pipeline - and perhaps like @Ahuaeynjgkxs mentioned, putting the audio in a separate thread.. but also like @Elwyn said it's the probably the symptom, not the cause... although I've seen hitching happen often when multiple SFX trigger simultaneously, like corpse explosion.. perhaps we need a setting like I've seen in other games, to limit the number of simultaneous audio streams, or something..
     
    Ahuaeynjgkxs likes this.
  12. StrangerDiamond

    StrangerDiamond Avatar

    Messages:
    4,355
    Likes Received:
    4,999
    Trophy Points:
    153
    Elwyn is talking through his hat a bit here, and not only that he ignored your OP that says some audio streams do not make you hitch.

    Every detail should be taken into account... I've been told that Unity shader routines are ABSOLUTELY not a culprit since R20... I even yelled at some devs (well they say I yelled because of caps lock)...

    This release, in the patch notes, there is a clear indicator that shaders were a major problem and that they will start working on it.

    So when someone says something too generalizing (because there is many types of hitching in SOTA which do not lock the whole computer) I tend to laugh.

    I was ridiculed with my shaders feedback and now it looks like it will be the MAIN source of improvement in game performance, just changing a few created a major improvement in loading times.

    I know I worked for a long time with Unity and Cryengine and Unreal engine.
     
    3devious and Echondas like this.
  13. Elwyn

    Elwyn Avatar

    Messages:
    3,619
    Likes Received:
    4,784
    Trophy Points:
    153
    Gender:
    Male
    Location:
    San Antonio, TX
    Except that those also have VFX, which is much harder on the system. And just pressing the ESC key to go in and out of the settings window also causes hitching.
     
    Ahuaeynjgkxs likes this.
  14. StrangerDiamond

    StrangerDiamond Avatar

    Messages:
    4,355
    Likes Received:
    4,999
    Trophy Points:
    153
    Indeed, I did not dispute VFX and reflective lighting weren't the main culprit, its just the way its done with operating systems (especially when handling multi-core) nowadays.

    Some threads will compete each other, sure they have buffer, but buffer underrun already happens when I'm merely pre-compiling complex audio, imagine with a game on top.

    I know of TWO programs in hundreds I have tried that handle multi-threading proficiently, with no memory leak. Even very professional publishers that make product for professionals sometimes use 20% of my CPU capacity, and when buffer underrun hits it drops to 5-10%.

    There was one program I used for audio that had no replacement, I had to ask someone to backengeneer it so we could use it with consistent performance, its unbeleivable the number of things we had to change.

    You'd think the publisher knows these things, but apparently they didn't.

    Worked for windows 2000, but good luck with the new OS, they have alot of people working on it that didn't talk to each other.
     
  15. Barugon

    Barugon Avatar

    Messages:
    15,716
    Likes Received:
    24,336
    Trophy Points:
    153
    Gender:
    Male
    This sounds like a garbage collection issue to me.
     
  16. Elwyn

    Elwyn Avatar

    Messages:
    3,619
    Likes Received:
    4,784
    Trophy Points:
    153
    Gender:
    Male
    Location:
    San Antonio, TX
    That's been my gut feeling, too, with a GC thread blocking everything else, especially with C# being a language that uses garbage collection. Memory-related performance work will probably help. Hopefully it's as bad as it is because of memory leaks causing fragmentation. And though it feels less so now, hitching at least used to get worse the longer you ran the client without quitting and restarting it. I'm not saying C# was a bad choice, there are good things you can get from it, but that's one of the trade-offs that you have to consider.

    Also, a few months ago, someone posted a link that explained how shaders can cause performance problems too. I just don't think shader compilation is as likely to stall audio threads as GC is.
     
    Ahuaeynjgkxs likes this.
  17. StrangerDiamond

    StrangerDiamond Avatar

    Messages:
    4,355
    Likes Received:
    4,999
    Trophy Points:
    153
    Credit goes to @Alley Oop , and I think he should be crowned for finding an article that described pretty much everything I was talking about since R20 and that everyone told me I was crazy because Unity would never keep that information from the customers, riiight.

    And since they didn't listen to me even if I pestered some devs about it for 20 releases... I guess they listened to @Alley Oop ... and in that case, maybe they should listen a little bit more to him... like pretty much right now he has alot to say :p

    *sigh*

    Now should I get my list of the 100 subjects I was told I was crazy about ? :D

    It does not stall audio threads, it simply is an adressing problem that gels the processor, and then indeed memory dumping and automated garbage collection causes memory leaks, which compound the problem with less than optimal multi-threading.
     
  18. Echondas

    Echondas Bug Hunter Bug Moderator

    Messages:
    3,785
    Likes Received:
    4,001
    Trophy Points:
    165
    Gender:
    Male
    Location:
    NY
    Interestingly, I saw much better performance / less hitching on my older Xeon W3550 CPU with hyperthreadong disabled .. I tested on my i7 also, and previously, it was slightly improved . I turned hyper threading back on with my i7 again last night, and haven’t noticed any loss/improcement, so far.
     
  19. Tiina Onir

    Tiina Onir Avatar

    Messages:
    1,103
    Likes Received:
    1,900
    Trophy Points:
    125
    Location:
    Bramble, South Paladis
    Sounds like there was a HT bug, sounds like it was fixed (maybe in one of the recent unity updates even, so Port may not have even known it was fixed). I know a number of games have had issues with HT in the past.
     
    Ahuaeynjgkxs likes this.
  20. StrangerDiamond

    StrangerDiamond Avatar

    Messages:
    4,355
    Likes Received:
    4,999
    Trophy Points:
    153
    Thats normal... its a hack intended to alleviate some blatant addressing issues, so is GC.

    The reason it does not improve performance anymore is because of the amount of new VFX that was added lately, we've reached the critical point.
     
Thread Status:
Not open for further replies.