xcode 由于“检查依赖关系”,在 XCode4 上构建缓慢

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5533799/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 20:43:38  来源:igfitidea点击:

Build slow on XCode4 because of "check dependencies"

xcodexcode4

提问by Bemmu

I have a fairly simple project with only two XIBs, 5 custom classes and 5 frameworks (CFNetwork, QuartzCore, UIKit, Foundation, CoreGraphics). I was using XCode 3.x before and recently updated to XCode 4. After I did, build times are sometimes up to a minute, typically about 30 seconds. I have an 2.4 GHz MBP with 4GB of memory.

我有一个相当简单的项目,只有两个 XIB、5 个自定义类和 5 个框架(CFNetwork、QuartzCore、UIKit、Foundation、CoreGraphics)。我之前使用过 XCode 3.x,最近更新到 XCode 4。在我使用之后,构建时间有时长达一分钟,通常大约 30 秒。我有一个带有 4GB 内存的 2.4 GHz MBP。

enter image description here

enter image description here

Looking at the build log in log navigator, I see "check dependencies..." come up for a long time, everything else happens nearly instantly. However clicking on this log entry doesn't reveal any more details. Where could I find more detailed info about what is causing this?

查看日志导航器中的构建日志,我看到“检查依赖项...”出现了很长时间,其他一切几乎立即发生。但是,单击此日志条目不会显示更多详细信息。我在哪里可以找到有关导致这种情况的原因的更多详细信息?

Update:

更新:

After rebooting, build returned to normal speed. There was possibly something happening in the background that was causing the slowdown.

重新启动后,构建恢复到正常速度。可能在后台发生了一些事情导致速度变慢。

采纳答案by Brennan

What you can do is turn off implicit dependencies. Edit the build scheme that is slow and find the build option called Find Implicit Dependencies. You will see the schemes at the top-left. Just select Edit Scheme and once that sheet comes down select Build on the left as you see in the attached screenshot. Then click OK and try your build again. (You may want to disable it for other schemes as well.)

您可以做的是关闭隐式依赖项。编辑速度较慢的构建方案并找到名为 Find Implicit Dependencies 的构建选项。您将在左上角看到方案。只需选择“编辑方案”,然后在该表出现后选择左侧的“构建”,如所附屏幕截图所示。然后单击“确定”并再次尝试构建。(您可能还想为其他方案禁用它。)

Find Implicit Dependencies

Find Implicit Dependencies

回答by JConway

For anyone else that stumbles upon this question because they have really slow build times. I managed to avoid the 2 minute long "Check Dependencies" stage by unchecking the following in this image http://i.stack.imgur.com/taXVc.png

对于偶然发现这个问题的任何其他人,因为他们的构建时间真的很慢。通过取消选中此图像中的以下内容,我设法避免了 2 分钟长的“检查依赖项”阶段http://i.stack.imgur.com/taXVc.png

  • analyze, test & archive checkboxes
  • parallize build
  • find implicit dependencies
  • 分析、测试和存档复选框
  • 并行化构建
  • 找到隐式依赖

I think it was just compiling really slowly because it was trying to build every single product at once.

我认为它只是编译非常缓慢,因为它试图一次构建每个产品。