X $ C $的C 4变得非常缓慢,杀死我的硬盘驱动器我的、缓慢、硬盘驱动器

2023-09-12 04:25:50 作者:姑娘,老纳成全你吧

我的机器有8 GB或RAM,Core 2 Duo处理器3,06 GHz和现在看来,这是远远不够的X $ C $的C 4(4.0.1)。 从一段时间以来,它开始表现得越来越慢。自动完成,编辑code,以及厦门国际银行文件变得几乎不可能使用。

My machine has 8 GB or RAM, Core 2 Duo 3,06 GHZ and it seems it is not enough for Xcode 4 (4.0.1). From some time now it started to behave more and more slow. Auto completion, editing code as well as Xib files became almost impossible to use.

其他应用程序的运行流畅。

Other applications behave smoothly.

活动监视器显示了很多RAM的使用(仍然很少GB留下了完全免费的内存,所以还是比较OK)和巨大的磁盘活动使用。我可以对数据的图表高峰见定期被保存时,我的工作在X $ C $℃。工作3小时后有10.5 GB写入磁盘的数据。它是正常的吗?

Activity monitor shows a lot of RAM usage (still few GB left of completely free memory, so it is quite OK) and huge disk activity usage. I can see on the graph high peaks of data being saved periodically when I work in Xcode. After 3 hours of work there is 10.5 GB of data written to the disk. Is it normal?

我试图禁用自动保存,但它并没有多大帮助。

I have tried to disable auto-save but it did not help much.

有什么可以第X code 4?

What can be the other causes of this extremely slow behavior of Xcode 4?

它没有这样的表现从一开始,这是不是在X $ C $ç索引要更加有趣:当X code为清洗后索引我的项目需要较少的CPU功耗比当索引完成(索引完成后,CPU竖起了)。嘿?

It did not behave like this from the beginning and it is not during Xcode indexing. To be even more interesting: when Xcode is indexing my project after cleaning it takes less CPU power than when indexing is done (CPU raises up after indexing again). Heh?

更新:雪豹的完全重新安装(以清理磁盘)与X code一起并没有多大帮助。 X code的工作相当不错只有一天左右,然后再次放缓至几乎不可能一起工作的程度。

UPDATE: Complete reinstall of Snow Leopard (to the cleaned disk) together with Xcode did not help much. Xcode was working quite well just for a day or so and then slowed down again to the degree it is hardly possible to work with.

推荐答案

更新:

解决的办法是在嘲笑周围#进口header.h语句。它看起来像X code需要大量处理能力的智能感知,当你你有复杂的/圆形的进口结构(通过性能工具追查 - X code的陷入无限递归函数调用循环)。 :当我提出尽可能多的进口我所能,实现文件和使用前向声明在标题,问题就走开了。

The solution was to mock around with #import "header.h" statements. It looks like Xcode requires a lot of processing power for intellisense when you you have complicated / circular imports structure (tracked down by performance tools - Xcode was falling into infinite recursive function call loop). When I moved as many imports I could to the implementation files and used forward declarations in headers, the problem went away.

这是我曾尝试过:

在重新安装(完全去除: 须藤 /开发/库/卸载,devtools -mode =人),并安装了新版本 4.0.2 - 没有帮助的。反正 - ?难道真的彻底清除作为我的主要自定义X code preference设置已存活) 在碎片整理(iDefrag - 全碎片整理的重建B树和元数据) - 并没有在所有帮助 系统的清洁和防病毒扫描 - CleanMyMac,MacKeeper - 并没有在所有帮助 管理 - 库 - 清理所有存储库(我用的Git和X code以某种方式保存清单有自身的原因,即使我只使用命令行管理GIT) - 小的改进 管理 - 项目 - 清理列表中的所有项目,除了打开的 - 小的改进 文件 - 资源控制 - 禁用显示远程状态(启用不知何故,THX到ThomasW用于指向这一点),但并没有太大的帮助。 X code - preference - 通用 - 禁用自动保存(只提示)和两个现场问题(在编辑器,在问题导航器) - 相当多的改进 封闭式工具面板和快速帮助窗格 - 最大的改进。我终于可以键入顺畅了!什么惊喜。这样一个简单的解决方案。它看起来像帮助索引/搜索助手简直太差劲了!为什么不这样做的背景什么的查找? Reinstalling (complete removal by: sudo /Developer/Library/uninstall-devtools –mode=al) and installed new version 4.0.2 - Did NOT help at all. Anyway - Is it really complete removal as my main custom Xcode preference settings has survived)? Defragmentation (iDefrag - full defragmentation with rebuiling B-Tree and Metadata) - Did NOT help at all. System cleaning and antivirus scanning - CleanMyMac, MacKeeper - did NOT help at all. Organizer - Repositories - cleaned all repositories (I use Git and Xcode somehow stores list there for its own reasons even if I use only command line to manage Git) - small improvement. Organizer - Projects - cleaned all Projects from the list except opened ones - small improvement File - Source control - disable Show Remote Status (was enabled somehow, thx to ThomasW for pointing to that), but did NOT help much. Xcode - Preference - General - Disable Auto-Save (prompt only) and both Live Issues (In Editors, In Issue Navigator) - quite a bit of improvement. Closed Utility Panel and Quick Help Pane - the biggest improvement! . I can finally type smoothly again! What a surprise. Such a trivial solution. It looks like help indexing / search assistant simply sucks! Why it does not do lookups in the background or something?

X code是仍然缓慢,但现在它几乎可以生产优质的性能工作。反正这是很可惜的Core 2 Duo 3,06Ghz / 8BG DDRIII RAM / Momentus XT的混合SS很难做到这一点。我是如此接近购买OCZ的顶点SSD还是因为这样的一些其他超级额外的SSD。

Xcode is still slow but now it is almost possible to work with production quality performance. Anyway it is quite a shame that Core 2 Duo 3,06Ghz / 8BG DDRIII Ram / Momentus XT SS Hybrid can hardly make it. I was so close to buy OCZ Vertex SSD or some other super extra SSD because of this.