karma-runner / karma-runner/karma
Very slow after capturing PhantomJS.
- Dominant language
- JavaScript
- Stars
- 12k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
```
% time ./node_modules/karma/bin/karma start node/tests/karma.conf.js
DEBUG [plugin]: Loading plugin karma-phantomjs-launcher.
DEBUG [plugin]: Loading plugin karma-mocha.
DEBUG [plugin]: Loading plugin karma-webpack.
DEBUG [plugin]: Loading plugin karma-sinon-chai.
DEBUG [plugin]: Loading plugin karma-coverage.
INFO [karma]: Karma v0.12.31 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
DEBUG [temp-dir]: Creating temp dir at /var/folders/14/x0syn_lj3nb1vg42h0wsl7lc4lm37t/T/karma-39250125
DEBUG [launcher]: /Users/sgr29/Projects/code/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs /var/folders/14/x0syn_lj3nb1vg42h0wsl7lc4lm37t/T/karma-39250125/capture.js
DEBUG [web-server]: serving: /Users/sgr29/Projects/code/node_modules/karma/static/client.html
DEBUG [web-server]: serving: /Users/sgr29/Projects/code/node_modules/karma/static/karma.js
DEBUG [web-server]: upgrade /socket.io/1/websocket/Ffsp3XoyzM4WqKJbzu14
DEBUG [proxy]: NOT upgrading proxyWebSocketRequest /socket.io/1/websocket/Ffsp3XoyzM4WqKJbzu14
DEBUG [karma]: A browser has connected on socket Ffsp3XoyzM4WqKJbzu14
INFO [PhantomJS 1.9.8 (Mac OS X)]: Connected on socket Ffsp3XoyzM4WqKJbzu14 with id 39250125
DEBUG [launcher]: PhantomJS (id 39250125) captured in 2.53 secs
<<< ~40s delay here >>>
DEBUG [watcher]: Resolved files:
/Users/sgr29/Projects/code/node_modules/chai/chai.js
/Users/sgr29/Projects/code/node_modules/sinon/pkg/sinon.js
/Users/sgr29/Projects/code/node_modules/mocha/mocha.js
etc ...
```
After Karma has captured PhantomJS it pauses for about ~40s while it does something, I'm not sure what, I thought webpack but run on it's own it doesn't take 40s.
What's Karma doing after it's captured PhantomJS?
Contributor guide
Research direction
Run `./node_modules/karma/bin/karma start node/tests/karma.conf.js` and compare the timestamps around PhantomJS capture and the watcher’s “Resolved files” output. Start with `node/tests/karma.conf.js` and the Karma launcher/watcher paths implicated by the debug log. Done means identifying what causes the approximately 40-second pause after capture and documenting the cause.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, webpack
- Domain
- testing-qa, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100