User panel stuff on forum
  9 posts on 1 page  1
Client Talk
2007-04-11, 22:44
Member
252 posts

Registered:
Dec 2006
I was wondering is there any reason why extracting all packs into there equavalent un-pak-ed directories for ease of browsing/development? (apart from, of course, that you lose the levels of priority of loaded files i.e pak0 is least priority and un-pak-ed stuff highest priority)

Are all the contents of paks loaded into ram or accessed from hdd when requested?
'on 120 ping i have beaten mortuary dirtbox and reload' (tm) mz adrenalin
'i watched sting once very boring and not good at all' (tm) mz adrenalin
[i]'i shoulda won all
2007-04-11, 22:53
Administrator
2058 posts

Registered:
Jan 2006
i use .pak only for tidying up
2007-04-12, 15:51
Member
1011 posts

Registered:
Feb 2006
is there some historical reason why id created their own container format (.pak) to store files? why didn't they just use .tar for example?
2007-04-12, 16:01
Member
1026 posts

Registered:
Feb 2006
or zip aka pk3
..oh wait
god damn hippies >_<
2007-04-12, 16:05
Member
1011 posts

Registered:
Feb 2006
well at that time they probably didn't use zip as a) p90s were too slow at decompressing stuff - making load times too long and b) they didn't want to pay licensing fees
2007-04-12, 16:18
Member
1026 posts

Registered:
Feb 2006
so you answered your own question? or you wanted a more in-depth answer for this?
i don't think anyone would really know this, except for the id creators (and JohnNy_cz :lol: )

maybe at first, when they launched the shareware version, they didn't want people to easily copy their media or see how the engine works with files..
god damn hippies >_<
2007-04-13, 07:47
Member
1435 posts

Registered:
Jan 2006
Pak files have some major speed benefits:
1) It's size won't change so if during the installation it was copied unfragmented on your HDD, it will always stay unfragmented (unless you modify it) and each time you load something from HDD, it will be read from the same place. That's a major speed up when reading something from HDD.
2) If you read something from a pak file, lots of mechanisms in your OS caches some area after the area you just read, so it's probable that the next file from pak you are going to read is already cached. When reading only one file your OS usually doesn't know that it should pre-cache some other file from the same directory.
3) Not only OS but also your HDD can pre-cache some data because it reads from blocks and how mentioned in point 1 - usually your pak files are in subsequent blocks each.
4) It can be easier for your OS to open/close only one file compared to open/closing many files. (Rather guessing here.)

So if you like fine-tuning and you would like to speed up loading time, move all your data to one .pak file and make sure it's not fragmented - e.g. move it to another partition and then back.
I'm sure that the speed up can be noticable, no matter how fast/slow your HDD is.

There's also a space factor:
If your allocation unit size is e.g. 16 kB (it's usually smaller), in average each file on your HDD takes extra 8 kB of your space. If the game contains like 400 files, that's more then 3 MB of extra HDD space. Having all the stuff in one file will save you 3 MB of your HDD space. I know .. *yawn*. But in 1996 that was a real argument I think
2007-04-13, 10:48
Member
252 posts

Registered:
Dec 2006
thanks johny_cz, perfect answer. What you've written should be in a document somewhere, if it's not already.
'on 120 ping i have beaten mortuary dirtbox and reload' (tm) mz adrenalin
'i watched sting once very boring and not good at all' (tm) mz adrenalin
[i]'i shoulda won all
2007-04-13, 11:56
Member
1100 posts

Registered:
Jan 2006
I think wrapped your mouse cable in tinfoil would have more of an impact on the gaming experience.

defragmenting does defragment, yes.
  9 posts on 1 page  1