STEAM GROUP
Steam Client Beta SteamBeta
STEAM GROUP
Steam Client Beta SteamBeta
40,228
IN-GAME
104,701
ONLINE
Founded
January 8, 2013
Instant pre-allocation: fsutil file createnew <filename> <lengthinbytes>
Steam has been pre-allocating files in a very stupid manner for years.

Touching a file and then filling it with Zero's is a waste of time and finite resources on storage.

You have the Steam Client Service running as System or a Administrator, there is no reason you couldn't use this command or a similar Windows API to pre-allocate files.

The way the command works is it just checks in with the NTFS free space bitmap and then makes a file of that size using the space it knows is free (w/basically zero disk writes). - Takes milliseconds to do any size file.

Example to make a 10GB file in a instant:
fsutil file createnew "C:\ValvePAK.wad" 10737418240

Pre-allocation should be optional honestly. If a user turns it off than its on them if they run out of space while downloading.

Make sure ACL's are correct if you implement this. You don't want the file owned and controlled by System or Administrators.

Thank-you for listening,
Quad


P.S. If you're worried about creating a file and then opening it and it's not zeroed out, don't. Try the command and then open your file in a hex editor, it WILL be all zero's.
Last edited by Quad5Ny; Mar 13, 2020 @ 9:06am
< >
Showing 1-1 of 1 comments
76561197965913409 Mar 13, 2020 @ 1:44pm 
Originally posted by cSg|mc-Hotsauce:
Ongoing mega thread...

https://steamcommunity.com/discussions/forum/10/2579854400756197490/

:qr:

Yeah I saw it but maybe the Steam team doesn't know about this.

It is already part of the their customers main OS (Windows). It requires work, sure but its not a crazy amount.
< >
Showing 1-1 of 1 comments
Per page: 1530 50

Date Posted: Mar 13, 2020 @ 9:01am
Posts: 1