delphirad-studioramdisk

Change RAD studio 10.2 Tokyo build path for Ram disk


For the reasons of the advantages of using the RAM Disk which is placed in the RAM memory instead of the HDD hard drives and SDD hard drives, we want as much as possible, created temporary files by RAD Studio, the files that the compiler/builder created during compile/build time, as well as the output files such as executable files, are created in the RAM disk drive.

Is it possible to change different build paths for projects in RAD Studio 10.2 Tokyo? How?

For example, instead of using drive C, use drive M which is a 4GB RAM disk.

Note that the project itself is inside C, but temporary files are moved somewhere else.

Benefits of using RAM disk:(reasons that is tempting me to do this)

Drawbacks:

But benefits of using RAM disk clearly overweight its drawbacks.

Okay, now that I convinced you reasonably why I want this, give me paths.

How can export configuration options into a file for restoring initial configuration options?


Solution

  • You can change the desired paths in Project > Options > Building > Delphi Compiler.

    More specifically you will probably want to change


    Any way I don't think you will gain much by using RAM disk with Delphi. Why?

    Unlike many other programming languages that go and recompile every unit on each compilation Delphi recompiles only those units whose code has actually changed since last compilation (unless you specifically chose to Build entire project). So generally there are not many rewrites of compiled files like (.dcu)

    You may gain some performance during linking time since Liker will be able to retrieve those compiled files from RAM drive a lot faster than from a regular drive. Well some modern SSD drives can retrieve cached files (they keep last few accessed files in their internal cache) very fast so there may not be a lot of performance gain there either.


    As for SSD wear out.

    The number of rewrites that you will cause with Delhi even if you go and full build your project every time is nothing to what what Windows is doing by storing all the file index information that it gathers by constantly indexing file contents. And yes I have seen Windows deep indexing contents of .pas files so every time you save your project Windows will reindex your files. That is unless you have disabled deep indexing of *.pas files as i do.

    Oh and don't get me started on how much data windows writes by gathering and then processing all the telemetry data it constantly monitors.

    If you ever had a chance to see Windows 10 or newer running on a computer with mechanical HDD you would know that I mean. My mom has one such computer and I'm actually surprised that her HDD stil works without a problem since it is grinding (reading/writing) pretty much all the time.