简体   繁体   中英

Xcode 6.4 Playground Extremely High CPU Usage

After updating to Xcode 6.4 if I open a playground and do just a nominal amount of work, say copy and paste an array such as:

[["udNKIbuMJM",0,0,""],["PrZtijrbAz",0,0,""],["Sd37qzfN70",0,0,""],["KT4WRSlbYj",0,0,""],["6DCBEZuwgB",0,0,""]]

The CPU load goes through the roof. The fan starts whirring and Activity Monitor clocks it in at 198% usage. Is anyone else experiencing this? If so, any solutions out there?

The array above was originally 83 items. As soon as I noticed it wasn't compiling I shortened it down to just 3 to see if that was the issue(not that that should be an issue) but the CPU load continued to climb.

I pasted your array in the following:

var array = [["udNKIbuMJM",0,0,""],["PrZtijrbAz",0,0,""],["Sd37qzfN70",0,0,""],["KT4WRSlbYj",0,0,""],["6DCBEZuwgB",0,0,""]]
array.dynamicType

Activity Monitor showed a couple of XCode-related processes peaking at 200% and 110% each, then the first one went down to 150% and disappeared in about 30 seconds, while the latter took up around one minute to disappear from Activity Monitor. The above code then compiled and array.dynamicType produced a nice

Swift.Array<Swift.Array<NSObject>>

in the Results Pane on the right side of Playground. Perhaps it just took Playground a while to parse the code and create the object, but on my side all was well in a minute or so. Also, my Mac Mini did not show any signs of stress: no fan going crazy nor program execution slowing down.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM