带有 Swift 超慢输入和自动完成功能的 Xcode 6 [英] Xcode 6 with Swift super slow typing and autocompletion

查看:34
本文介绍了带有 Swift 超慢输入和自动完成功能的 Xcode 6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是我还是 Xcode 6 (6.0.1) 和 Swift 在您键入代码时似乎超级慢,尤其是自动完成功能?

Is it just me or Xcode 6 (6.0.1) with Swift seems to be super slow when you type your code, especially with autocompletion?

一个普通的 Objective-C 类,即使在 Swift 项目中,也几乎和以前一样工作,所以是 Swift 杀死了它.

A normal Objective-C class, even if inside a Swift project, works almost the same as before, so it's Swift that kills it.

有没有其他人遇到同样的不便?你知道如何提高性能吗?

Does anyone else experience the same inconvenience? Do you have any idea of how to improve performance?

  • 我尝试了一些设置,但没有成功.
  • 我当然也尝试过重新启动 Xcode 和计算机,但没有成功.
  • 没有其他重的应用已打开.

我使用的是 2009 年中期的 Macbook Pro(2.26 GHz Intel Core 2 Duo)和 8GB RAM 和 SSD HD,这根本不是最新的东西,但仍然不是一个完整的垃圾.

I use a Mid 2009 Macbook Pro (2.26 GHz Intel Core 2 Duo) with 8GB RAM and SSD HD, which is not the newest thing at all, but still not a complete junk.

很遗憾,因为我很高兴开始使用 Swift,现在真的无法忍受.

It is a shame as I was excited to start using Swift and it is now really unbearable.

想法/技巧?

推荐答案

  • 退出 Xcode 并重新启动 Mac 不是必需的,但首选.
  • 删除文件夹的内容~/Library/Developer/Xcode/DerivedData
  • 删除内容 ~/Library/Caches/com.apple.dt.Xcode
    • Quit Xcode and restart the Mac are not required but preferred.
    • Delete the content of the folder ~/Library/Developer/Xcode/DerivedData
    • Delete the content ~/Library/Caches/com.apple.dt.Xcode
    • 这是一个临时解决方案,但效果很好.

      This is a temporally solution, but works greatly.

      使用脚本编辑器应用程序在脚本下方.

      Below the script using Script Editor app.

      tell application "Terminal"
          do script "rm -frd ~/Library/Developer/Xcode/DerivedData/*"
          do script "rm -frd ~/Library/Caches/com.apple.dt.Xcode/*"
      end tell
      

      或者,您可以为终端创建别名,如下所示:

      Alternatively, you can create an alias for your terminal like this:

      alias xcodeclean="rm -frd ~/Library/Developer/Xcode/DerivedData/* && rm -frd ~/Library/Caches/com.apple.dt.Xcode/*"
      

      您可以将其添加到您的 ~/.bash_profile 中,然后每次要清除这两个文件夹时在命令行上键入 xcodeclean.

      You can add that to your ~/.bash_profile and then type xcodeclean on the command line every time you would like to clear those two folders.

      这篇关于带有 Swift 超慢输入和自动完成功能的 Xcode 6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆