【发布时间】:2016-10-29 15:13:06
【问题描述】:
刚开始使用基于this tutorial 的ccache,到目前为止我喜欢它。但是,缓存未命中非常慢。这是我的结果:
Regular clean build without ccache : 1m40s
First build with ccache : 4m36s
Second build with ccache : 30s
我不确定从哪里开始调试。性能页面 (https://ccache.samba.org/performance.html) 提到了 make 文件的复杂性会降低编译速度,但在这种情况下,我使用 Xcode,因此调用 ccache 应该相对较快。我预计性能会有所下降,但不会这么多!
我目前的设置使用的是 3.2.5 版本:
export CCACHE_MAXSIZE=3G
export CCACHE_HARDLINK=true
export CCACHE_SLOPPINESS=pch_defines,file_macro,time_macros,include_file_mtime,include_file_ctime,file_stat_matches
请注意,我确实使用了 pch,如果它改变了一些东西的话。
【问题讨论】:
-
你的 ccache 目录在哪里?我猜您的 ccache 目录位于远程(例如 nfs)上并导致性能下降。
-
它在我的主目录中,所以这不是问题。
标签: c++ ios xcode performance ccache