运行 Safari 上的 karma 慢得令人痛苦
Running karma on Safari painfully slow
我们使用 teamcity 运行 我们的客户端单元测试与 Karma。
在 IE、Firefox、Chrome 和 Safari 上的测试 运行。问题是,当 Safari 运行 进行 2500 次测试时,它需要大约 1 小时才能完成测试。其他浏览器会在几分钟内完成。
在 Safari 8.0.8 (Mac OS X 10.10.5) 上 运行s,karma 版本 0.13.9
有没有人遇到过同样的问题并有解决办法?
我们也在使用 TeamCity 运行 客户端测试 Karma。
我们遇到了与 Safari 7.1.8 (Mac OS X 10.9.5) 相同的性能问题,但仅在屏幕关闭或屏幕保护程序处于活动状态时出现。在这些情况下,Safari 运行 进行测试,然后保持打开和空闲状态。当屏幕打开时一切正常。
我们目前的解决方法是让 iMac运行测试的屏幕始终保持打开状态。
除了 screen/screen 保护程序之外,另一个可能导致性能问题(对于所有浏览器)的原因是 App Nap。我们为我们用于测试的浏览器禁用了它。
We also had this exact same issue and the App Nap answer did not solve it for us. Though shortly after we did finally get it to 运行 consistently fast.
So I hope the following list of actions might be useful for some other poor soul whom may also have spent stupid amounts of time trying to solve this.
Our current setup for the TeamCity build agent and the Mac itself that hosts is are as follows.
- Having the build agent setup in the way recommended by jetbrains, if you set up the build agent for pre 9.0 versions of TeamCity the recommended way of doing it was different and gave problems with various type of GUI related activities.
Disabling App Nap for good measure, as mentioned this didn't make a difference for us but reading about it after finding it here points that it may be worthwhile to do. If you want to do it globally on the computer (which we did) 运行 the following in the terminal:
defaults write NSGlobalDomain NSAppSleepDisabled -bool YES
Disable the Mac Display Sleep, this was the clincher for us. I saw that whenever Safari started 运行ning slow again the screen had turned off on the Mac in question (as in having entered power saving mode). So after disabling that the Safari 运行s have now been 运行ning consistently fast.
我们使用 teamcity 运行 我们的客户端单元测试与 Karma。
在 IE、Firefox、Chrome 和 Safari 上的测试 运行。问题是,当 Safari 运行 进行 2500 次测试时,它需要大约 1 小时才能完成测试。其他浏览器会在几分钟内完成。
在 Safari 8.0.8 (Mac OS X 10.10.5) 上 运行s,karma 版本 0.13.9
有没有人遇到过同样的问题并有解决办法?
我们也在使用 TeamCity 运行 客户端测试 Karma。
我们遇到了与 Safari 7.1.8 (Mac OS X 10.9.5) 相同的性能问题,但仅在屏幕关闭或屏幕保护程序处于活动状态时出现。在这些情况下,Safari 运行 进行测试,然后保持打开和空闲状态。当屏幕打开时一切正常。
我们目前的解决方法是让 iMac运行测试的屏幕始终保持打开状态。
除了 screen/screen 保护程序之外,另一个可能导致性能问题(对于所有浏览器)的原因是 App Nap。我们为我们用于测试的浏览器禁用了它。
We also had this exact same issue and the App Nap answer did not solve it for us. Though shortly after we did finally get it to 运行 consistently fast. So I hope the following list of actions might be useful for some other poor soul whom may also have spent stupid amounts of time trying to solve this.
Our current setup for the TeamCity build agent and the Mac itself that hosts is are as follows.
- Having the build agent setup in the way recommended by jetbrains, if you set up the build agent for pre 9.0 versions of TeamCity the recommended way of doing it was different and gave problems with various type of GUI related activities.
Disabling App Nap for good measure, as mentioned this didn't make a difference for us but reading about it after finding it here points that it may be worthwhile to do. If you want to do it globally on the computer (which we did) 运行 the following in the terminal:
defaults write NSGlobalDomain NSAppSleepDisabled -bool YES
Disable the Mac Display Sleep, this was the clincher for us. I saw that whenever Safari started 运行ning slow again the screen had turned off on the Mac in question (as in having entered power saving mode). So after disabling that the Safari 运行s have now been 运行ning consistently fast.