It's happened.... hitching problems found and fixed (mostly still WIP)

124

Comments

  • Ghosthree3Ghosthree3 Join Date: 2010-02-13 Member: 70557Members, Reinforced - Supporter
    edited November 2013
    Turning on alien vision so they turn orange is possible too.

    EDIT: Also modding alien vision in the default consistency OR this one could make them turn blue as well.

    I don't understand the problem.
  • Ghosthree3Ghosthree3 Join Date: 2010-02-13 Member: 70557Members, Reinforced - Supporter
    edited November 2013
    Added another ignore to drop a ton of files that really didn't need to be scanned.

    https://gist.github.com/anonymous/816dee7a03174e772066

    EDIT: Damn it, didn't realise I double posted. Mod merge.

    EDIT: Replaced ignore for all py files,

    https://gist.github.com/anonymous/26f56f483e5ecfe63de5
  • tuxatortuxator Join Date: 2010-01-07 Member: 69958Members, Reinforced - Gold
    edited November 2013
    I'm no C/C++ low-level developer but instead a C#/Java developer so this may be really stupid but...in C# you've a FileSystemWatcher class with which you can listen to changes done inside a specified directory. Event types would be added/removed/renamed files. Wouldn't that be sufficient? If the event fires, you know someone tinkered with the files. If it doesn't fire you're good. Add to that an initial checksum check right after you registered for the events and everything's good.

    Or did I miss something important somewhere? (I most probably did, but I don't see it)
  • MaddokMaddok Seattle, WA Join Date: 2002-11-10 Member: 8049Members, Reinforced - Shadow, WC 2013 - Supporter
    I would hope they are verifying memory, not files.
  • ns2isgoodns2isgood Join Date: 2013-04-16 Member: 184847Members
    I don't get these hitches when the game starts and my load times are normal, so I don't understand this. Is this something just affecting a small group of people?

    I do however get hitch/lag/stutter mid-late game, or entering rooms with a lot going on. Is this related to this fix?
  • IronHorseIronHorse Developer, QA Manager, Technical Support & contributor Join Date: 2010-05-08 Member: 71669Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Subnautica Playtester, Subnautica PT Lead, Pistachionauts
    @ghosthree3
    You should include the .hlsl file in the ignore list, since thats the new AV file type (which allows everyone to run their own AV, like its supposed to be doing [should be fixed down the road hopefully])
  • Ghosthree3Ghosthree3 Join Date: 2010-02-13 Member: 70557Members, Reinforced - Supporter
    edited November 2013
    Maddok wrote: »
    I would hope they are verifying memory, not files.

    It's not. Countless tests showing how often the files are getting opened (200 times in some files cases when loading or running around in game) shows that these files are getting accessed way more than they need to be. Perhaps it checks memory as well, but it definitely checks the files. How the game SHOULD work is check all the files once when the game boots and have them set to read only until the game closes. Then keep a list of all the hashes it got from that initial check and use that for comparison (also read only). Unfortunately I don't know how to do this right now, I haven't even looked, might even be binary stuff I can't touch.
    IronHorse wrote: »
    @ghosthree3
    You should include the .hlsl file in the ignore list, since thats the new AV file type (which allows everyone to run their own AV, like its supposed to be doing [should be fixed down the road hopefully])

    There's ignores for darkvision etc. The problem is files like this exist "Cloaked.hlsl". Pretty sure that one needs to be left blocked.

    EDIT: Now blocks edits to marine models, reskinning should be possible though?

    https://gist.github.com/anonymous/e177fae557447f0e7d84

    EDIT2: Now blocks changes to mines so you can't make them red etc.

    https://gist.github.com/anonymous/75d89b8cbeaf28fd77e0
  • Ghosthree3Ghosthree3 Join Date: 2010-02-13 Member: 70557Members, Reinforced - Supporter
    edited November 2013
    Ok, final version (hope) should block any form of cheating and added two options depending on what people want,

    Without blocking gun viewmodels:
    https://gist.github.com/anonymous/8bc8611b7a70dfc60a88

    With blocked viewmodels for the rifle, shotgun and pistol (we don't need to stop people turning the GL or FL invisible give me a break), also alien viewmodels (eg. skulk mouth):
    https://gist.github.com/anonymous/7f586c04b0a81c6a24b5
  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    edited November 2013
    Just to put it in perspective
    http://pastebin.com/ese3WhcB
    That's a list of things not loaded with texture streaming on when you join the RR.
    https://www.dropbox.com/s/nog96h8lg5sbe1t/249 TS test.zip
    Use notepad++'s compare plugin to compare TS on and off on 24, as well as 249 TS on and 260 with TS.
    For some reason lua files are opened like 90 times when loading the same too...

    Another big note: switching from one build to another (even 260 and 259) will result in obscene hitches. With TS OFF I get NO hitches whatsoever. NONE. I then turn TS ON (which is forced on now) and I go from 260 to 249. I get the same MASSSSIVE hitches. Like the MASSIVE team join hitch.
  • Ghosthree3Ghosthree3 Join Date: 2010-02-13 Member: 70557Members, Reinforced - Supporter
    Yeah, we need an option to load like 249 did with streaming off :(
  • MrFangsMrFangs Join Date: 2013-03-27 Member: 184474Members, Reinforced - Shadow
    Ghosthree3 wrote: »

    I think the list of checked models should also include everything that is dynamic and relevant for gameplay - for example cysts, hydras, clogs, webs, babblers, ...

    The problem with not checking these is that one could edit these models' geometry to make them stick through walls - IIRC, there was a hack in TFC that added long spikes to the sentry model, which gave away their position. So even a modified clog or babbler model would give away the information that a gorge is active in that area.

    Following that line of though, the models of all alien and marine buildings should be added as well. Maybe it's easier to add models/* and define exclusions?

    I'm fine with removing most of the texture checks, though. Checking building textures, for example, is not worth the overhead.
  • Ghosthree3Ghosthree3 Join Date: 2010-02-13 Member: 70557Members, Reinforced - Supporter
    edited November 2013
    Yeah I guess so, it shouldn't take long to implement, will edit in a few minutes. I'd be adding only *.model files so textures should still be changeable if you want pink cysts (lol).

    EDIT:
    Without blocking gun viewmodels:
    https://gist.github.com/anonymous/97350fff834444e4e20b

    With blocked viewmodels for the rifle, shotgun and pistol (we don't need to stop people turning the GL or FL invisible give me a break), also alien viewmodels (eg. skulk mouth):
    https://gist.github.com/anonymous/ad4bd68ec2519709d2a1
  • MigeMige Join Date: 2005-03-19 Member: 45796Members, Reinforced - Supporter
    edited November 2013
    Can you SamusDroid upload that 249 build, I want to check is the texture streaming my biggest reason that DX9 give some slowdowns and while using dx11 it just give some hitches or windows 8/8.1 thing.. Ofc that build don't have dx11 ;)
  • Ghosthree3Ghosthree3 Join Date: 2010-02-13 Member: 70557Members, Reinforced - Supporter
    249 with texture streaming off is like, the cleanest most stable unbuggy game ever :o
  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    edited November 2013
    Mige wrote: »
    Can you SamusDroid upload that 249 build, I want to check is the texture streaming my biggest reason that DX9 give some slowdowns and while using dx11 it just give some hitches or windows 8/8.1 thing.. Ofc that build don't have dx11 ;)
    I already did prove it's texture streaming. No I won't upload it, because I don't have 8 GB somewhere to store it and ...well many reasons. It's forced texture streaming causing your hitches. While I do hate windows 8 I don't have a reason to blame it here. DX11 is less stable in this game than DX9. So that and TS being on probably explains your hitches.
    Ghosthree3 wrote: »
    249 with texture streaming off is like, the cleanest most stable unbuggy game ever :o
    Except you can feel the slower mouse response time as that was actually improved after reinforced ;)

  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    ns2isgood wrote: »
    I don't understand why texture streaming is forced if there is an option in the graphics menu to disable it.

    They didn't want to remove the option for some reason...
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    Ok so if I am following this correct, the hitching is a possible result of the texture streaming re-loading unloaded textures (to conserve memory), which causes them to be consistency checked again resulting in hitches?

    I think I might have a solution to that.
  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    No. It's all texture streaming. Consistency...well that's obviously going to increase load times but has nothing to do with hitches
  • joederpjoederp Join Date: 2012-11-02 Member: 165992Members
    I do recall that previously I was able to smooth my game be ENABLING TS, back in like 245 or something. Then in more recent builds the hitching is back and as you said, the texture streaming option seems to not make a difference, seems like it is always on (game loads and you can actually watch textures load onto their models for a few seconds).

    So is there no way to manually disable TS to see if it helps?
  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    Texture streaming is always forced on now no matter the option, it was just not removed to prevent accidentally breaking things.
  • MigeMige Join Date: 2005-03-19 Member: 45796Members, Reinforced - Supporter
    edited November 2013
  • alsteralster Join Date: 2003-08-06 Member: 19124Members
    So anyone changing their graphics from DX11 to DX9 will see a performance boost.
  • MrFangsMrFangs Join Date: 2013-03-27 Member: 184474Members, Reinforced - Shadow
    So it is definitely loading the same textures repeatedly? That would match some console output I've been wondering about, but I don't understand why it's done this way. IIRC, even a 32-bit app like NS2 has a 4Gb address space on a 64-bit system, which should be plenty to hold all textures once loaded, even with memory fragmentation. Of course, on 32-bit systems (especially without the /3gb flag) it needs to fall back to what it is doing now. But why force it on all systems?
  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    Don't confuse opening with loading. We don't know why they turned it off for everyone.
  • Ghosthree3Ghosthree3 Join Date: 2010-02-13 Member: 70557Members, Reinforced - Supporter
    edited November 2013
    Mige wrote: »
    experimental texture streaming is now forced experimental texture streaming. It seems that low texture quality is the only option then

    I have actually seen zero hitches mid game (except for the early game first engagement shit like blood and shell casings loading for the first time) since enabling low texture quality. I guess streaming isn't unloading them as much any more for me.
    xDragon wrote: »
    Ok so if I am following this correct, the hitching is a possible result of the texture streaming re-loading unloaded textures (to conserve memory), which causes them to be consistency checked again resulting in hitches?

    I think I might have a solution to that.

    From tests I've done I think consistency checking does make hitches worse. But only because of the texture streaming in the first place. If you preload everything with no streaming (like 249) then you wouldn't hitch due to the consistency.

    Why do I think this? Ran multiple tests and on a server with NO consistency I froze up for under half the time for first engagement related freezes.


    EDIT: I've actually done more tests recently with someone helping me out and discovered the following. Load time is not only hindered by disk read speed but also communication to the server when loading.

    Example: Loading a listen server on an SSD with default consistency takes about 15s or so (I can't actually remember the numbers but look at them relative to others). If you load a listen server the same way after putting the entire game on a ramdrive it will load in about 3s.
    However, connecting to a server (default consistency) on an SSD is about 20s to load, and on a ram is about the same, maybe a little less so 18s.
    Connecting to a server with no consistency checking on an SSD is about a 15s load and on a ramdrive is about 5s.

    So if you have a standard HDD then your load time is being bottlenecked by read speed. Once you get an SSD it's being bottlenecked by your connection to the server more than anything else (sending a ton of hashes and waiting for replies maybe?).
  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    Not entirely true. I have never ran consistency, ever, and it was 99% better with TS off than on on 249.
  • Ghosthree3Ghosthree3 Join Date: 2010-02-13 Member: 70557Members, Reinforced - Supporter
    edited November 2013
    Updated post above. Though it's not related to the original point, new findings!

    EDIT: Hitches didn't disappear for me with consistency off, they just weren't as bad. Easy example of a MASSIVE hitch, joining marine/alien/spectator after first joining a server. That first time it freezes for ages, no, this isn't it loading things. It's because it's checking consistency, with none it's instant (well almost) every time first time.
    This is just a sequence of many hitches one after the other resulting in one big freeze. Unlike say the shell casing which is just one thing and as such is a smaller freeze.
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    Well I think i can block it from unloading textures for clients, but after testing it a bit it seems to still be doing it with models also (perhaps, didnt investigate it very far).

    If you feel like testing, i added it to the NSL mod (sv_nsltextures to toggle it on/off). I dont think it will completely resolve hitching on team joins, but I would be curious to see if you think it helps hitching during a round.
  • Ghosthree3Ghosthree3 Join Date: 2010-02-13 Member: 70557Members, Reinforced - Supporter
    Honestly, just need it fixed so "Texture Streaming: Off" loads everything on the loading screen like it did in 249. That will fix the issues.
Sign In or Register to comment.