My app unit tests 20x times slower when upgrading to 0.9.0-rc1
I am running my app unit test in karma 0.12.31 and phantomJS 1.9.16. I am seeing a weird issue when upgrading to the latest ng material 0.9.0-rc1: my app unit tests drastically slow down and some tests even start timing out after 2 seconds due to the done callback not being called. What used to take 3 seconds to execute all app unit tests under 0.8.3, now it takes 60 seconds to execute less than 50% of the tests with 0.9.0-rc1. Rolling back angular material to 0.8.3 brings everything back to normal. Please let me know if you guys have any idea what may be going on.
@demisx - Have you run npm cache clean; npm update ?
Afterwards, what versions of node, npm, karma, and gulp are you using?
Also please check your /node_modules/angular and determine which version of Angular has been installed.
BTW, Our unit test now run in three (3) passes to test the following usages: (a) unminified, (b) minified, and (c) minified with jQuery. Here is my console log:
~/projects/material [master]: gulp karma
[22:04:11] Using gulpfile ~/projects/material/gulpfile.js
[22:04:11] Starting 'karma'...
[22:04:11] Running unit tests on unminified source.
[22:04:11] building js files...
INFO [karma]: Karma v0.12.32 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 42.0.2311 (Mac OS X 10.9.5)]: Connected on socket lwB2LOoOSgfo-OnCAAAA with id 2788103
Chrome 42.0.2311 (Mac OS X 10.9.5): Executed 391 of 391 SUCCESS (6.069 secs / 6.004 secs)
[22:04:20] Running unit tests on minified source.
INFO [karma]: Karma v0.12.32 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 42.0.2311 (Mac OS X 10.9.5)]: Connected on socket bRLoJFmkPRi1IhVMAAAB with id 68412939
Chrome 42.0.2311 (Mac OS X 10.9.5): Executed 391 of 391 SUCCESS (8.579 secs / 8.465 secs)
[22:04:30] Running unit tests on minified source w/ jquery.
INFO [karma]: Karma v0.12.32 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 42.0.2311 (Mac OS X 10.9.5)]: Connected on socket ny0Hk591W1epVqaAAAAC with id 7520570
Chrome 42.0.2311 (Mac OS X 10.9.5): Executed 391 of 391 SUCCESS (8.773 secs / 8.661 secs)
[22:04:39] Finished 'karma' after 29 s
@ThomasBurleson Please see below. I just wanted to clarify, that I am seeing this behavior with my app own unit tests, not the ng material project unit tests.
Have you run npm cache clean; npm update?
Yes. I've also tried checking out the app branch clean on another laptop. Same issue
Afterwards, what versions of node, npm, karma, and gulp are you using? Also please check your /node_modules/angular and determine which version of Angular has been installed.
node = 0.12.2 karma = 0.12.31 gulp = v4 angular = 1.4.0-rc0
I'm experiencing the same issue
@demisx -
- Where did you find Angular 1.4.0-rc1? That version does not exist.
- You are using Gulp v4? The latest version online seems to be 3.8.11...
@ThomasBurleson I have my sources. :) Sorry, I meant 1.4.0-rc0, of course. I'll update the comment.
@ThomasBurleson Regarding gulp, v4 has been in alpha for a while now and runs fine. The gulp task for kicking off unit tests is pretty standard, though:
gulp.task('unit', function () {
karma.start({
configFile: __dirname + '/specs/unit/karma.config.js',
singleRun: true
});
});
Same problem here. To make it clear: my own unit test are not running any more (timeout on phantomJS) or are incredibly slow (chrome) with the 0.9.x release.
@all - This will be investigated today.
If you guys can't replicate the issue, I can show it on my desktop via online meeting or something. I think creating a plunker maybe somewhat challenging here.
Same issue here on our app after upgrading to 0.9.0-rc3
@demisx - I think a Hangout would be the best venue to pair-investigate this issue; as we are not seeing this issue with our core team development. Can you email me.
@ThomasBurleson Hi Thomas. I've sent you the email a couple of days ago. Just wanted to make sure you got it. It was sent to gmail shown on your GH profile page.
Hey Dmitri, Yes, I did receive your email(s). The team and I have been very busy trying to get the final release of 0.9.0 resolved and published. Can you and I have a hangout next Tuesday afternoon (CST)? What GST/Timezone are you in?
I look forward to our hangout and [hopefully] resolve this testing issue. Thanks again.
Thomas
On Fri, May 1, 2015 at 9:39 AM Dmitri Moore [email protected] wrote:
@ThomasBurleson https://github.com/ThomasBurleson Hi Thomas. I've sent you the email a couple of days ago. Just wanted to make sure you got it. It was sent to gmail shown on your GH profile page.
— Reply to this email directly or view it on GitHub https://github.com/angular/material/issues/2439#issuecomment-98146185.
Same issue here. Already tried with PhatomJS 2, and had no luck. What could angular-material have changed in such a global way that could have affected performance of any tests running under PhantomJS? This performance hit happens with all our tests. The simple fact that angular-material.js is loaded causes the problem. Notice that the problem started with 0.9rc1.
Why don't you guys just load the tests in chrome and inspect what is causing these slowdowns?
Happens here as well
I'm seeing the same problem after upgrading angular-material to v0.9.0
node v0.12.2 angular v1.3.15 angular-material v0.9.0 gulp v3.8.11 karma v0.12.32 jasmine-core v2.3.0 karma-jasmine v0.3.5 karma-phantomjs-launcher v0.1.4
PhantomJS 1.9.8 (Mac OS X): Executed 84 of 215 SUCCESS (0 secs / 30.36 secs)
PhantomJS 1.9.8 (Mac OS X): Executed 84 of 215 DISCONNECTED (39.639 secs / 30.36 secs)
[08:33:29] 'test' errored after 42 s
[08:33:29] Error: karma: tests failed with code 1
at formatError (/Users/jaredcacurak/.npm-packages/lib/node_modules/gulp/bin/gulp.js:169:10)
at Gulp.<anonymous> (/Users/jaredcacurak/.npm-packages/lib/node_modules/gulp/bin/gulp.js:195:15)
at Gulp.emit (events.js:107:17)
at Gulp.Orchestrator._emitTaskDone (/Users/jaredcacurak/stash/frontend/node_modules/gulp/node_modules/orchestrator/index.js:264:8)
at /Users/jaredcacurak/stash/frontend/node_modules/gulp/node_modules/orchestrator/index.js:275:23
at finish (/Users/jaredcacurak/stash/frontend/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
at cb (/Users/jaredcacurak/stash/frontend/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
at karmaComplete (/Users/jaredcacurak/stash/frontend/gulpfile.js:185:13)
at removeAllListeners (/Users/jaredcacurak/stash/frontend/node_modules/karma/lib/server.js:220:7)
at Server.<anonymous> (/Users/jaredcacurak/stash/frontend/node_modules/karma/lib/server.js:231:9)
at Server.g (events.js:199:16)
at Server.emit (events.js:129:20)
at net.js:1409:10
at process._tickCallback (node.js:355:11)
Me too, the time taken to run my tests on phantomjs has increased by about 20 times. phantomjs memory usage increases progressively throughout the test run, as does the time taken for each test to complete.
Running my tests against Chrome is taking approximately twice as long as it was with angular-material 0.8.3.
Angular 1.3.15 PhatomJS: 1.9.16 Karma: 0.12.31 Node: 0.10.35
And still no metrics guys? Use the Timeline tab or the profiler in developer tools to see what is taking so long. Just saying that it is slow does not help the ng-material team much.
@everyone - We are aware of this issue; which originates [in part] from Theming changes and mocks. We plan to have a fix for this within the next 1-2 days.