Precaching

Ness_FrogKingNess_FrogKing Join Date: 2012-10-18 Member: 162628Members
What precisely does precaching during the loading screen do... and why does it take so long? Before 222/223 I used to be one of the first ones in the RR when the map changed. Now the game has already started by the time I finish loading, and precaching seems to be the culprit.

Comments

  • Taz-Taz- Australia Join Date: 2003-11-26 Member: 23597Members, Constellation, Squad Five Blue
    Primarily loading textures into VRAM. Watch r_stats while it's happening, becomes pretty clear what it's up to.
  • Laosh'RaLaosh'Ra Join Date: 2011-12-09 Member: 137232Members
    edited October 2012
    in case you don't know what this means: loading all the textures for a faster access while playing (if you were to read them from disc space every time you need them it'd be very slow)
  • Ness_FrogKingNess_FrogKing Join Date: 2012-10-18 Member: 162628Members
    Thanks for the replies! I figured it was something along those lines, so I tried setting textures back to Low, but that didn't seem to help much. Guess I'm stuck with slow loads for now.
  • GISPGISP Battle Gorge Denmark Join Date: 2004-03-20 Member: 27460Members, Playtest Lead, Forum Moderators, Constellation, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, NS2 Map Tester, Reinforced - Onos, WC 2013 - Gold, Subnautica Playtester, Forum staff
    Loads stuff before the actual games starts, so it dosnt load when playing = better performance ingame.
  • _Necro__Necro_ Join Date: 2011-02-15 Member: 81895Members, Reinforced - Shadow
    Check if you have enough free RAM. If you are playing NS2 with the firefox or others open in the background, NS2 may need to put all this data on your hard drive instead of the RAM.
  • Ness_FrogKingNess_FrogKing Join Date: 2012-10-18 Member: 162628Members
    I have 8 GB on a 64-bit system, plus the video card has 1 GB, so I hope I'm good there.

    I tried disabling my AV as well, since I have it set to be paranoid and scan everything, but that didn't help much, if at all, either. Thanks for the suggestions though :-)
  • sushia11sushia11 Join Date: 2012-10-12 Member: 162112Members
    Your system has more ram then mine, and I find the loading to be fine. We may just have different ideas about how long loading times should take. I came in just before the pre-order beta thing ended, and I think I saw a good reduction in the loading times. It also seems to stutter less, but I dunno.

    How fast is your HDD/RAM too?
  • TimMcTimMc Join Date: 2012-02-06 Member: 143945Members
    I wish NS2 precached while I was on the server browser, rather than wait until I selected a game. Its a rather long wait first time.
  • Taz-Taz- Australia Join Date: 2003-11-26 Member: 23597Members, Constellation, Squad Five Blue
    <!--quoteo(post=1998912:date=Oct 28 2012, 08:45 PM:name=TimMc)--><div class='quotetop'>QUOTE (TimMc @ Oct 28 2012, 08:45 PM) <a href="index.php?act=findpost&pid=1998912"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I wish NS2 precached while I was on the server browser, rather than wait until I selected a game. Its a rather long wait first time.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Then it would need to cache textures for every map, which would be incredibly inefficient.
  • IeptBarakatIeptBarakat The most difficult name to speak ingame. Join Date: 2009-07-10 Member: 68107Members, Constellation, NS2 Playtester, Squad Five Blue, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow
    I wish it'd throw the hud elements in the precaching then unload the other huds when you join a side.

    If I don't use texture steaming the game takes forever to load, and if I do, most of the hud elements are transparent for most of the game. I've been playing matches with no crosshair, marine map, ammo clips remaining, and my minimap doesn't load, I also can't see most of the buy menus.
  • TimMcTimMc Join Date: 2012-02-06 Member: 143945Members
    <!--quoteo(post=1998914:date=Oct 28 2012, 04:51 AM:name=Taz1)--><div class='quotetop'>QUOTE (Taz1 @ Oct 28 2012, 04:51 AM) <a href="index.php?act=findpost&pid=1998914"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Then it would need to cache textures for every map, which would be incredibly inefficient.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Considering the game loads much faster on your second game than the first, clearly textures and resources are shared enough that some sort of pre-loading could take place.

    All I'm saying is that the initial load is seriously long. We live in an age where most games load in seconds not minutes.
  • Soylent_greenSoylent_green Join Date: 2002-12-20 Member: 11220Members, Reinforced - Shadow
    <!--quoteo(post=1998914:date=Oct 28 2012, 04:51 AM:name=Taz1)--><div class='quotetop'>QUOTE (Taz1 @ Oct 28 2012, 04:51 AM) <a href="index.php?act=findpost&pid=1998914"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Then it would need to cache textures for every map, which would be incredibly inefficient.<!--QuoteEnd--></div><!--QuoteEEnd-->

    No, of course not. The textures, sounds and models for every player class and structure type covers a huge chunk of the loading that needs to be done. You can just start precaching that as soon as you're into the game.
  • Soylent_greenSoylent_green Join Date: 2002-12-20 Member: 11220Members, Reinforced - Shadow
    <!--quoteo(post=1999046:date=Oct 28 2012, 02:11 PM:name=TimMc)--><div class='quotetop'>QUOTE (TimMc @ Oct 28 2012, 02:11 PM) <a href="index.php?act=findpost&pid=1999046"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->All I'm saying is that the initial load is seriously long.<!--QuoteEnd--></div><!--QuoteEEnd-->

    That's right. And even on an SSD it's quite lengthy; much of the stuff it does when joining a server/loading resources is not pure harddrive reads. It starts by negotiating with the server, usually takes some seconds, then there is the appearance of doing nothing for 20 seconds or so(it is probably "compiling" the level, triangulating the polygons, splitting the level into chunks, creating data structures for occlusion culling etc.). Then it gets to loading actual assets; this is pretty quick on an SSD, but it is much slower than the actual read speed of an SSD(Even reading 4k files a typical SSD does ~10-20 MB/s, weighted by size most reading is from larger files, so a typical SSD would do maybe 100-200 MB/s ). It's clearly doing some kind of processing on files that takes longer than raw reads.

    <!--quoteo(post=1999046:date=Oct 28 2012, 02:11 PM:name=TimMc)--><div class='quotetop'>QUOTE (TimMc @ Oct 28 2012, 02:11 PM) <a href="index.php?act=findpost&pid=1999046"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->We live in an age where most games load in seconds not minutes.<!--QuoteEnd--></div><!--QuoteEEnd-->

    The big flaw is obvious and well known. NS2 is comprised of 8000 files and harddrives take 10-20 MS to move the needle to where it needs to go; more if the drive is in "quiet seek" mode. You could easily be spending a minute in just seek time. The way almost every game since wolfenstein 3D has solved this is by packing files toghether into some kind of lump of files associated files so that as many files can be read sequentially without seeking as is possible. E.g. .bsp, .wad, .pak, .ncf, .gcf...

    If you don't defrag your HDD you introduce a lot of unnecessary seeks.

    NS2 does a little of this(e.g. all the fade's sounds are in alien_4.fsb, rather than having 10 audio files for fade footsteps, 10 attack sounds, 5 pain sounds etc.).
  • TimMcTimMc Join Date: 2012-02-06 Member: 143945Members
    <!--quoteo(post=1999081:date=Oct 28 2012, 03:47 PM:name=Soylent_green)--><div class='quotetop'>QUOTE (Soylent_green @ Oct 28 2012, 03:47 PM) <a href="index.php?act=findpost&pid=1999081"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The way almost every game since wolfenstein 3D has solved this is by packing files toghether into some kind of lump of files associated files so that as many files can be read sequentially without seeking as is possible. E.g. .bsp, .wad, .pak, .ncf, .gcf...<!--QuoteEnd--></div><!--QuoteEEnd-->

    Perhaps they need to introduce packs such as this then. Separate by resource type and if the file is validated against server version on load, and then give us a packing-unpacking tool.

    As nice as it is to have all the game files just sitting there, its causing problems. Also having packs such as .bsp allows for hierarchies of which file gets loaded - so users can install mods without overwriting the original games files. I'm not sure how mod installation works with NS2, I've only joined modded servers but never modded my actual game.
  • DghelneshiDghelneshi Aims to surpass Fana in post edits. Join Date: 2011-11-01 Member: 130634Members, Squad Five Blue, Reinforced - Shadow
    edited October 2012
    Sorry, but am I seriously the only one who has 10sec loading time without having an SSD? This topic is really surprising for me personally.

    I'd really hate having to pack files into some arbitrary format for the game when modding.
  • Ness_FrogKingNess_FrogKing Join Date: 2012-10-18 Member: 162628Members
    I'm not sure what happened, but suddenly I'm getting quick loads again and am once again one of the first in the RR after a map change. Maybe it was something with 225?

    <!--quoteo(post=1999103:date=Oct 28 2012, 04:54 PM:name=Dghelneshi)--><div class='quotetop'>QUOTE (Dghelneshi @ Oct 28 2012, 04:54 PM) <a href="index.php?act=findpost&pid=1999103"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I'd really hate having to pack files into some arbitrary format for the game when modding.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Wouldn't necessarily be necessary. I think Morrowind, for example, had the base files in a pack, but mod files could be left loose in a directory and would overwrite the base files.
  • MasterEvilAceMasterEvilAce Join Date: 2002-11-29 Member: 10268Members, Reinforced - Shadow
    I have extremely slow loading times in NS2. It feels like it takes two minutes to connect/load into a game. The precaching section of the loading is quite fast, it's just everything before that is rather sluggish and slow. It seems like there's not even a whole lot of HD access during this time, so I'm not sure what is going on. There is definitely room for a lot of improvement, here. I have an i7 920 @ 3.3ghz, 6GB of ram, and an 8800 GTS 640mb, and the game is on a dedicated drive.

    In-game the performance is "ok"... With everything on low I get 20-30fps usually but it's not a steady framerate. I know the problem is my graphics card, but my GTX 260 has stability issues. With the 260, I get roughly 50 FPS with most settings on high... I don't remember what the load time was with that card, though.
  • ArgathorArgathor Join Date: 2011-07-18 Member: 110942Members, Squad Five Blue
    The most strange part of all this is around b185 the game used to load within 1-2 seconds, with no problems with textures (using an SSD).

    Now it takes 6 or more seconds at least and textures appear while in the game.

    There must have been some significant changes to the underlying system to make it so much slower/worse.
  • 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
    edited October 2012
    <!--quoteo(post=1998969:date=Oct 28 2012, 07:18 AM:name=IeptBarakat)--><div class='quotetop'>QUOTE (IeptBarakat @ Oct 28 2012, 07:18 AM) <a href="index.php?act=findpost&pid=1998969"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I wish it'd throw the hud elements in the precaching then unload the other huds when you join a side.

    If I don't use texture steaming the game takes forever to load, and if I do, most of the hud elements are transparent for most of the game. I've been playing matches with no crosshair, marine map, ammo clips remaining, and my minimap doesn't load, I also can't see most of the buy menus.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Screenshots, please! (f12)
    TY

    edit: and specs / driver info
  • Zomb3hZomb3h Join Date: 2011-01-27 Member: 79241Members, Reinforced - Shadow
    When should Texture Streaming be used?
  • XariusXarius Join Date: 2003-12-21 Member: 24630Members, Reinforced - Supporter
    Just like performance, my loading time seems to fluctuate wildly between builds. In 226 my loading times seem faster than 225, though my performance has been worse since 225.
Sign In or Register to comment.