Long delay before callback gets called after StackTrace.fromError()
See original GitHub issueHello,
I’ve noticed that there is a significant delay for resolving the callback, about 15-70s between the time I do the call to StackTrace.fromError
and the time the callback actually gets called.
I have an angular project, and to reproduce the issue I simply add the following line when booting up the app:
console.log('calling fromError');
StackTrace.fromError(new Error(), { sourceCache : {}}).then(function() { console.log('first source map done')});
results in
2017-04-26 10:09:39.989 calling fromError
2017-04-26 10:09:55.197 first source map done
Looking at what happens in the Chrome’s Network tab, it looks like only one call to getting the sourceMaps is done (though subsequent calls to fromError
will generate more requests to get the sourceMaps, they are taken from the cache so it doesn’t seem to be an issue, and at least not relevant to the one at hand here).
Removing the source maps from the compilation solves the issue (less than 1s delay), so it seems to be linked with sourcemap loading or resolving.
I’m testing in local, so downloading the ~2-4MB sourcemaps is fast (and I also reproduce the latency when getting the sourcemaps from cache), so I assume it’s the parsing that takes time.
Is there anything you know I could do to speed up this process? I’m using stacktrace parsing to send notifications on Slack when something goes wrong, and I’m worried the user might close the window before the full processing is done if it takes too long.
Thanks for your help!
Sébastien
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:8 (3 by maintainers)
Top GitHub Comments
Great library but experienced the same issues with the UI freezing. Wouldn’t mind a webworker solution if anyone can figure it out.
I’d like to notify that we are running into the same problem with disastrous results. Calls to _parseMappings are making the entire UI freeze for upwards of 8 seconds in severe cases. We have been forced to remove stacktracejs as a consequence.