Friday, October 29, 2010

Faster compiling

Fabrice Garcia, a REAL Studio user, pointed out that if you can compile to a memory-based storage device, compilation is much, much faster. For Windows 7 users, you need an SD card and use the Windows "ready boost" feature in Windows 7.


For Mac users, there may be SD card options but the new MacBook Air uses only memory-based storage. So if you are thinking about a Mac laptop, that might be a consideration.

3 comments:

BCReason said...

Mac OS can make RAM Disks. This is most likely faster than flash based memory. I'd try compiling to a RAM Disk.


Create a RAMdisk
diskutil erasevolume HFS+ "[name]" `hdiutil attach -nomount ram://[blocks]`;
name = name of the drive

blocks = size of the drive in 512 byte blocks

For example 2GB = 2 * 1.024 byte * 1.024 * 1.024 / 512 = 4.194.304 blocks

Create a 2GB ramdisk:

diskutil erasevolume HFS+ "RAMdisk" `hdiutil attach -nomount ram://4194304`;

If it is not needed anymore just eject the drive (Command + E).

Create a 4GB ramdisk:

diskutil erasevolume HFS+ "RAMdiskA" `hdiutil attach -nomount ram://4194304`;

Karen said...

If you have to keep your project on the ramdisk for that to work you run the risk of losing your changes to power failure or system crash.

If you can keep the project on the hard disk and set it to compile (for debug as well final build) to RAMDisk that could be viable.

Or if you could save the project/edits to two paths one being HD and the other RAMDisk and so do the while compile on RAMDisk that could work too.

But I don't think you can do either now.

TJ said...

That sounds like a great feature request - Allow assignment of Build folders to alternate location. My SAS Array operates at over 450MB/sec compared to the 63MB/Sec on my internal drive.