Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates sinon. It's kind of hard to explain why it's important, but I'll give it a try:
My first test was timing out when calling the
stub
function of this library. I found out that this was happening when I had a lot of test files. My investigation revealed thatstub
method in this library calls the sinon 4 stub function.source-map-support
npm package ( https://github.com/evanw/node-source-map-support ) which will change the error stack to map to the original files.This can be seen in the attached performance profile ( between 1100ms-1250ms)
sourcemaps - CPU-20180531T160228.zip
Sinon 5 no longer creates this stack trace in the
wrapMethod
function:https://github.com/sinonjs/sinon/blob/master/lib/sinon/util/core/wrap-method.js#L110
Oh and interestingly enough. The slow piece of code (SourceMapConsumer) that resulted in this timeout is exactly what is being replaced by WASM, which you started working on meteor/meteor#9568 (comment) . So if we can upgrade to
source-map
v0.7, we can probably also upgrade meteor'ssource-map-support
package and avoid such issues in the first place.