OS X open RamDisk to accelerate as Safari and Xcode

With the upgrade version of Xcode,speedMore slowly,In particular, Yiyanbuge "Whiteboard"I believe we will have problems encountered。

Xcode recurring loss of code highlighting,Commonly known as "white."

This is the very thing affecting development efficiency。If it is possible,Then we will Xcode cache file into memory,It should be much faster speed。(Although rmbp of ssd have a very fast,But compared to memory,Or far worse -For older machines for mechanical hard drives,Speed ​​will be more apparent。

- Remember the RamDisk Windows do? In fact, there are Linux,And does not require third-party software,A built-in command can be done!

Our goal is to set aside part of the space from memory,Formatting a hard disk mounted to it which system,Designed to put the cache!

Must pay attention to

Since it is a memory,So be sure to shut contentLoseof,So we just use it to storeCan regenerateCache,They can then download the content should not be placed inside。For example, in the helpd OS X Help files downloaded,Should not be placed inside

Your memory is how much total space,Volume of hard disk memory allocation size should be changed accordingly,After all, the memory of a fixed planning to go,For example, I used here is 1GB,So my original 8GB memory size becomes 7GB。

DIY

Open the OS X built-in script editor ,Create a new document,Other default,Then write in it:

  • 2048 1MB
  • 2097152 1GB
  • 4194304 2GB
  • 8388608 4GB

Then save it as a .appFormat:

Save the script as an application

Double-click execution can automatically mount called "RamDisk" of the hard disk,The hard drive contents will be cleared after the computer reboot,Size is 1GB,If you put it launched,So things will be lost inside,So be sure to store cache files。

After generating,We have to replace the cache over other applications,Xcode for it,You can directly within the application,But here we use a unified alternative ways catalog,Some benefits are not supported configurations such as Safari ,We can also manually put it into memory cache directory replacement,Transparent to the application。

Here we replace three applications,First, they quit:Safari Chrome Xcode

Then delete the cache directory applications:

These are the files in the directory can be deleted at any time,You will be automatically re-establish open,Your data will be lost。

Then according to our well-established catalog in memory hard drive to create a directory link,Just like in Windows shortcuts,But much more useful than that:

This directory is replaced by a set of permanent,so,We should also make this memory hard drive mounted automatically at boot time,Then only need to "System Preferences"among-"Users & Groups”-“Log Optionsapp files created before "was added to。

Delete and restore

If you want to delete the entire program,You only need to go to the following link directory to delete files created,Then remove the startup items like scripts:

Performance and results

If you just do a general Xcode development,So 1GB of space should be sufficient to use the,As a result of the speed will be much faster Xcode,No longer so easy to whiteboard。Other,For Chrome and Safari effect is very obvious。

If you're like me to switch back and forth more often use Xcode development projects and compile,You may experience space stuffed,At this time you should pay attention to this "memory disk" will not release their own space,So to go in manually delete the cache files generated about Xcode,Then compile。

On the bright side,Even regenerate the cache file,Speed ​​is still faster than the solid,Will not reduce the life of the hard disk read and write。

 

Further reading

How to make Xcode speed read and write 100 times on?

Open native Mac OS X comes with virtual memory disk (Ramdisk)

Original article written by LogStudio:R0uter's Blog » OS X open RamDisk to accelerate as Safari and Xcode

Reproduced Please keep the source and description link:https://www.logcg.com/archives/2725.html

About the Author

R0uter

The non-declaration,I have written articles are original,Reproduced, please indicate the link on this page and my name。

Comments

    1. Excuse me, May follow suit and produce ramdisk browser with cache folder, While deleting the hard disk cache folder, But after the actual opening browser, But it is simultaneously written to the hard disk and Ramdisk same data, Hard disk equal to or written to be used as cache, Why not just have information ramdisk fishes?

Leave a Reply

Your email address will not be published. Required fields are marked *