【问题标题】:Xcode 4.2 is very slow to save a file / frequently beach-ballsXcode 4.2 保存文件非常慢/经常是沙滩球
【发布时间】:2011-11-09 20:22:10
【问题描述】:

我将 Xcode 4.2 用于 Lion / 生产版本。以前版本的 Xcode 4 表现还不错。

每次我保存一个文件,有时是随机的,沙滩球会无缘无故地显示 5-10 秒。

我使用颠覆是为了它的价值。

我捕获了一个样本,它似乎在这里的某个地方:

1775 Thread_791676   DispatchQueue_1: com.apple.main-thread  (serial)
+ 1775 ???  (in Xcode)  load address 0x103392000 + 0xeec  [0x103392eec]
+   1775 NSApplicationMain  (in AppKit) + 867  [0x7fff9684180c]
+     1775 -[NSApplication run]  (in AppKit) + 555  [0x7fff965c2682]
+       1775 -[IDEApplication sendEvent:]  (in IDEKit) + 366  [0x103c95b71]
+         1775 -[NSApplication sendEvent:]  (in AppKit) + 4282  [0x7fff9662c170]
+           1775 -[NSApplication _handleKeyEquivalent:]  (in AppKit) + 526  [0x7fff9673488d]
+             1775 -[NSMenu performKeyEquivalent:]  (in AppKit) + 281  [0x7fff96735c3a]
+               1775 CFRunLoopRunSpecific  (in CoreFoundation) + 230  [0x7fff8e744ae6]
+                 1775 __CFRunLoopRun  (in CoreFoundation) + 1724  [0x7fff8e7454dc]
+                   1775 _dispatch_main_queue_callback_4CF  (in libdispatch.dylib) + 308  [0x7fff8c3ba72a]
+                     1775 _dispatch_call_block_and_release  (in libdispatch.dylib) + 18  [0x7fff8c3b88ba]
+                       1775 __-[NSDocumentController(NSInternal) _onMainThreadInvokeWorker:]_block_invoke_3  (in AppKit) + 492  [0x7fff96995333]
+                         1775 __-[NSDocument performAsynchronousFileAccessUsingBlock:]_block_invoke_6  (in AppKit) + 94  [0x7fff96964cad]
+                           1775 -[IDEEditorDocument continueFileAccessUsingBlock:]  (in IDEKit) + 71  [0x103db69db]
+                             1775 -[NSDocument continueFileAccessUsingBlock:]  (in AppKit) + 227  [0x7fff96964898]
+                               1775 __-[NSDocument saveToURL:ofType:forSaveOperation:completionHandler:]_block_invoke_1  (in AppKit) + 845  [0x7fff96969702]
+                                 1775 -[NSDocument _fileCoordinator:coordinateReadingContentsAndWritingItemAtURL:byAccessor:]  (in AppKit) + 248  [0x7fff9697b25c]
+                                   1775 -[NSFileCoordinator(NSPrivate) _coordinateReadingItemAtURL:options:writingItemAtURL:options:error:byAccessor:]  (in Foundation) + 829  [0x7fff96471e65]
+                                     1775 -[NSFileCoordinator(NSPrivate) _invokeAccessor:orDont:thenRelinquishAccessClaimForID:]  (in Foundation) + 207  [0x7fff9646ea8d]
+                                       1775 __-[NSDocument saveToURL:ofType:forSaveOperation:completionHandler:]_block_invoke_7  (in AppKit) + 1313  [0x7fff96985c80]
+                                         1775 __-[NSDocument saveToURL:ofType:forSaveOperation:completionHandler:]_block_invoke_14  (in AppKit) + 502  [0x7fff9698535a]
+                                           1775 -[NSDocument _preserveContentsIfNecessaryAfterWriting:toURL:forSaveOperation:version:error:]  (in AppKit) + 286  [0x7fff9697b004]
+                                             1775 -[NSDocument _preserveContentsOfURL:forReason:comment:options:error:]  (in AppKit) + 335  [0x7fff96978c88]
+                                               1775 -[NSFileVersion(NSPrivate) _setDocumentInfo:]  (in Foundation) + 54  [0x7fff9648e905]
+                                                 1775 GSLibrarySetGenerationInfoValueForKey  (in GenerationalStorage) + 620  [0x7fff8eab60bf]
+                                                   1775 ipc_set_info_value  (in GenerationalStorage) + 250  [0x7fff8eaa714d]
+                                                     1775 mach_msg  (in libsystem_kernel.dylib) + 73  [0x7fff95131d71]
+                                                       1775 mach_msg_trap  (in libsystem_kernel.dylib) + 10  [0x7fff9513267a]

【问题讨论】:

    标签: xcode4.2


    【解决方案1】:

    您的系统上是否有任何防病毒软件? 在我关闭防病毒保护之前,我遇到了同样的问题。

    【讨论】:

    • 我的系统上有 Kaspersky AV,并且遇到了所描述的问题。停止 AV 应用程序阻止了沙滩球。遗憾的是,将我的 dev 文件夹添加为 AV 的排除项并不能解决问题,所以我在编码时没有 AV。 :-(
    • 我在一个有代理的公司网络上。在减速期间运行 wireshark 并看到一些代理身份验证错误。我的理论是 Xcode 正在使用文件保存作为更新某些内容的机会。我禁用了文档更新,它工作得更好!
    • +1 我发现 Sophos 在每次保存文件时增加了大约 20 秒的延迟。
    • 太棒了!如果可以暂停它而不删除“访问扫描”
    猜你喜欢
    • 1970-01-01
    • 2020-06-05
    • 2011-12-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-10-06
    • 2018-07-16
    • 1970-01-01
    相关资源
    最近更新 更多