Re:Show HN: httpinvoke – js HTTP client - easy progress even...
by antihero on Saturday October 05, 2013 @03:52PM
(#6501815)
Say, hypothetically (I haven't done any tests or anything) that Bluebird was faster than the included promise specification, is there some sort of dependency injection to replace it, seeing as it's a spec?
[ Parent
| on HN ]
Re:Show HN: httpinvoke – js HTTP client - easy progress even...
by tahu on Saturday October 05, 2013 @04:33PM
(#6501967)
Without a doubt Bluebird, When.js, Q, then/promise and others are faster. The implementation in httpinvoke is optimized for code size.
The other reason for current solution is that the specification for creating and resolving promises [1] is not yet published.
Having a Promise object in global scope, as exported by Q, Bluebird and then/promise, is not enough. There is no uniform way to hack into these implementations and use their promises resolver.
But when resolvers-spec is available, httpinvoke will definitely check for already loaded promises library and reuse it.