Closed dciccale closed 7 years ago
Should not globally set longStackTraces option from bluebird (https://github.com/beardon/mws-api/blob/master/lib/client.js#L15) because it will be set in bluebird singleton instance itself, forcing my or any project to have this enabled even in the production environment. Which apparently it can have a 2x-3x performance impact http://bluebirdjs.com/docs/api/promise.config.html#comment-3322469547
longStackTraces
Consider using Promise.getNewLibraryCopy http://bluebirdjs.com/docs/api/promise.getnewlibrarycopy.html to create a custom instance and enable longStackTraces to that instance.
Promise.getNewLibraryCopy
const Promise = require('bluebird'); console.log(Promise.hasLongStackTraces()); // false (bluebird's default) const mws = require('mws-api'); console.log(Promise.hasLongStackTraces()); // true (after importing mws-api)
fixed in #91
Should not globally set
longStackTraces
option from bluebird (https://github.com/beardon/mws-api/blob/master/lib/client.js#L15) because it will be set in bluebird singleton instance itself, forcing my or any project to have this enabled even in the production environment. Which apparently it can have a 2x-3x performance impact http://bluebirdjs.com/docs/api/promise.config.html#comment-3322469547Consider using
Promise.getNewLibraryCopy
http://bluebirdjs.com/docs/api/promise.getnewlibrarycopy.html to create a custom instance and enablelongStackTraces
to that instance.