Jump to content
The Dark Mod Forums

[Resolved in TDM 2.10] When Will Loading Times Be Too Long?


Mik James

Recommended Posts

I took a quick look at the long loading times in TDM with Valgrind and it looks like the inflate_fast function (for unzipping) takes up a large portion of the loading time according to Valgrind:

 

snapshot1tiubm.png

 

I had a quick glimpse at the function here: https://github.com/revelator/The-Darkmod-Experimental/blob/7d86b82fce9eb587952c4963b928fd7974ecfa78/src/framework/Unzip.cpp#L3475

and it looks like it's very old and optimized for old hardware. I've never looked at the deflate/inflate algorithm before but maybe there are faster ways to do this on modern hardware.

 

Unfortunately the reality of it seems to be different.

I tested this by loading up the largest mission we have: Crucible of Omens, in TDM and timing how long it takes to go from "Start Mission" to "Click to Start" appearing.

I then unpacked the ZIP file into the BCD directory to remove unzipping as a bottleneck in the loading process, and the times were the same, give or take a second or 2.

Here is what the directory looks like:

 

PK4:

post-529-0-81053000-1454288136_thumb.png

 

Unzipped:

post-529-0-98526200-1454288139_thumb.png

            Run 1        Run 2        Run 3        Run 4
PK4:        53.32 sec    53.32 sec    52.31 sec    53.10 sec
Unzipped:    52.12 sec    51.55 sec    51.33 sec    51.76 sec

  • Like 1

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

 

 

Unfortunately the reality of it seems to be different.

I tested this by loading up the largest mission we have: Crucible of Omens, in TDM and timing how long it takes to go from "Start Mission" to "Click to Start" appearing.

I then unpacked the ZIP file into the BCD directory to remove unzipping as a bottleneck in the loading process, and the times were the same, give or take a second or 2.

 

Thanks for the test but what about all the pk4 files coming with TDM itself?

 

If you look at the Doom 3 BFG code you'll see that the Unzip.cpp changed a bit since Doom 3 and that inflate_fast() was removed: https://github.com/id-Software/DOOM-3-BFG/blob/master/neo/framework/Unzip.cpp

I don't know how BFG's loading times compare to Doom 3 though.

  • Like 1
Link to comment
Share on other sites

BFG uses binary assets. It's not quite comparable to what we have. That said, you may have a point about packed mod assets loading too. Though the SVN where

we do development has unpacked assets and mission loading isn't substantially faster there.

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

 

Thanks for the test but what about all the pk4 files coming with TDM itself?

 

If you look at the Doom 3 BFG code you'll see that the Unzip.cpp changed a bit since Doom 3 and that inflate_fast() was removed: https://github.com/id-Software/DOOM-3-BFG/blob/master/neo/framework/Unzip.cpp

I don't know how BFG's loading times compare to Doom 3 though.

 

That test I did was with all the files unzipped, I'm using the SVN version which does not have pk4's.

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

  • nbohr1more changed the title to [Resolved in TDM 2.10] When Will Loading Times Be Too Long?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 4 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...