在Linux上加快链接速度/快速链接 [英] Speed Up linking speed / Fast linking on linux
问题描述
每隔十分钟,我将构建一个Webkit(200万行代码),以查看更改的输出,并且在我的机器上链接Webkit需要处理600-700 MB的目标文件.硬盘.大约需要1.5分钟.我想加快此链接过程.
I am building webkit ( 2 Million lines of code) after every ten minutes to see the output of my change in it, and linking of webkit on my Machine requires to process 600-700 MB of object files which are there on my hard-disk. That takes around 1.5 minutes. I want to speedup this linking process.
有没有机会我可以告诉os将所有目标文件仅保留在RAM中(我有4 GB的ram).还有其他加快链接速度的方法吗?
Is there any chance that, I can tell os to keep all the object files in RAM only ( I have 4 GB of ram ). Is there any other way to speed up the linking?
感谢任何想法或帮助!
这是一个需要1.5分钟的命令,
Here is a command which takes 1.5 minutes,
推荐答案
1). tmpfs :挂载目录,其中包含所有目标文件为tmpfs.
1). tmpfs: mount directory which contains all the object files as tmpfs.
2). 黄金链接器:使用黄金链接器,使用tmpfs可以使链接速度提高5-6倍优势加速将是普通链接的7到8倍.在ubuntu上使用以下命令,您的普通链接器将替换为Gold Linker.
2). gold linker: using gold linker will make linking 5-6 times fast, with tmpfs advantage speedup will be 7-8 times than normal linking. use following command on ubuntu and your normal linker will get replaced with Gold Linker.
sudo apt-get install binutils-gold
您可以使用黄金链接器找到一些链接错误,线程下面是一个很好的帮助.
You can find some linking error using gold linker, below thread is a good help on it.
这篇关于在Linux上加快链接速度/快速链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!