Handmade Hero » Forums » Code » Make the compiler faster.
BillDStrong
Bill Strong
52 posts
#4891 Make the compiler faster.
3 years, 11 months ago

The last two episodes, Casey has been doing some really cool work,but the compiler speed, as fast as it is, has been slightly annoying, now that the recompiling is happening while looking at the game.

Part of this is simply perception, since this is technically happening faster than the previous method, we are just noticing it now.

but part of it might be due to the limitations of a spinning disk drive, and of Microsoft's NTFS file system, which is optimized for accessing larger files, and is notoriously bad at accessing lots of small files.

So, what if we changed up the project setup. if we put the Handmade Here source into an image backed ram disk, I wonder if the speed of the compiler would be much less noticeable.

We could use IMDisk, a free open source ram disk creator that works on Win NT up to Windows 10 to create Ramdisks, and can be setup to save the ram disks to an img file, or vhd or something else.

We can assign the ram disk the same drive letter so we don't have to change anything there. But we might need to change the game loop save location, as I don't think we want to store that in memory, since it can be several Gigs, with several at a time.

Otherwise, I see no problems, and we could even turn on the asset stuff he turned off to speed up the build.

Just a thought, and thanks Casey for this great resource, and for not being boring.

P.S. I watch the episodes at 2X speed, and Casey, if you haven't seen that, you are like a different person, and your jokes are even funnier, as the timing doesn't give me enough time to even guess were you are going with it.