karma-runner / karma

Spectacular Test Runner for JavaScript
http://karma-runner.github.io
MIT License
11.96k stars 1.71k forks source link

Performance issue with serving files in Karma 1.4 #2538

Open hengroy opened 7 years ago

hengroy commented 7 years ago

Expected behaviour

I have an Ext JS project with over 500 files. With karma 1.3, it was serving all these files in around 3-5s.

karma13

Actual behaviour

With Karma 1.4 and the exact same files, it was taking over 80 seconds to serve these files, which results in a timeout before the tests can even run.

karma14

Environment Details

Steps to reproduce the behaviour

  1. Simply run npm test with Karma 1.3 and 1.4
wesleycho commented 7 years ago

Could https://github.com/karma-runner/karma/commit/3d94b8c be the culprit @dignifiedquire ? I wonder if this would be improved when we switch to Node 6+ .

dignifiedquire commented 7 years ago

@wesleycho that shouldn't be a problem, safe-buffer checks if the methods are there before patching