'....failed to commit files' Couldn't communicate with a helper application.

如題,某天在Xcode commit files遇到此狀況,解決方式如下

●先確認你的git name & email是否跑掉(空值)
Show you the global settings for user.name and user.email (and other things)
git config --global -l
參考網址 https://forums.developer.apple.com/thread/18560

●如果真的跑掉,再設定回去吧
1.更改git電子郵件
指令    xcrun git config --global user.email xxxx
範例    xcrun git config --global user.email karen_chang@somedomain.com
2.更改git用戶名
指令    xcrun git config --global user.name xxxx
範例   xcrun git config --global user.name Karen_Chang

Core Data Fetches Instrument

最近參考Core Data by Tutorials v2.0調整library效能
在第九章Measuring and Boosting Performance Page224中提到demo程式碼Fetch Duration花費約2,000 microseconds(2 seconds)

我也測了一下自己的專案效能,發現不得了,取個二三筆也要2秒多(如下圖粉紅圈起處2,113)

改啊改 都已經在fetch data前先透過countForFetchRequest確認是否真的要向entity下查詢
怎麼還是2秒多 @_@

後來才發現是單位明明就是microseconds
電子書雞婆的換算2,000 microseconds(2 seconds)是錯的!!!
2,000 microseconds應該是0.002 seconds才對 囧


雖然有點囧,但至少改寫成可避免效能差的寫法 T_T