petkaantonov/bluebird
View on GitHub ↗ ★ 20,467 JavaScript
:bird: :zap: Bluebird is a full featured promise library with unmatched performance.
87 mentions on Hacker News by 66 people: 13 stories, 74 comments · first 2013-10-04 · latest 2022-08-24
20082026
-
…example, at one point in time, a switch statement with more than 128 cases could not be optimized. https://github.com/petkaantonov/bluebird/wiki/Optimization-k...
comment by tantalor · 2022-08-24 · in Oven: The Company Behind Bun -
…elements, this can be seen as a micro-optimization. `bluebird` uses new Array() extensively, e.g. https://github.com/petkaantonov/bluebird/blob/12154adb501660...
comment by DXA9zE · 2020-05-24 · in Avoid Using New Array() in JavaScript -
…resource I've found about v8 specific performance is the bluebird optimization killers wiki: https://github.com/petkaantonov/bluebird/wiki/Optimization-k... wiki, and the v8 bailout reasons repo: https://github.com/vhf/v8-bailout-reasons
comment by nwhatt · 2018-03-13 · in JavaScript and Node performance coding tips to make applications faster -
…is a violation of the spec. IIRC there are some tests to prevent that in the test suite. [1]: https://github.com/petkaantonov/bluebird/blob/2c9f7a44/src/s...
comment by Arnavion · 2017-08-28 · in Async Iterators: These Promises Are Killing My Performance -
…be run by node), you might apply optimizations to change the code to be more performant on V8 (see https://github.com/petkaantonov/bluebird/wiki/Optimization-k... for example). I love it and can't wait to use it on some projects!
comment by jamescostian · 2017-05-03 · in Prepack helps make JavaScript code more efficient -
this [1] is probably what you want 1. https://github.com/petkaantonov/bluebird/wiki/Optimization-k...
comment by cwmma · 2017-03-02 · in V8: A Tale of TurboFan -
Oh you're right. https://github.com/petkaantonov/bluebird/blob/master/src/pro...
comment by STRiDEX · 2016-10-19 · in Node v6.9.0 (LTS) -
…i = 0; i < arguments.length; i++){ args[i] = arguments[i]; } func.apply(context, args); Source: https://github.com/petkaantonov/bluebird/wiki/Optimization-k...
comment by wanda · 2016-10-06 · in Why I write plain JavaScript modules -
…but I think there is room for more practical and direct advice. Here are some resources for JS: - https://github.com/petkaantonov/bluebird/wiki/Optimization-k... - https://github.com/amark/gun/wiki/100000-ops-sec-in-IE6-on-2... -…
comment by marknadal · 2016-09-20 · in Laws of Performant Software -
He also has a nice page on his github with lots of info on making stuff fast on node. https://github.com/petkaantonov/bluebird/wiki/Optimization-k...
comment by tonyle · 2016-09-05 · in Three JavaScript performance fundamentals that make Bluebird fast -
…makework async task, like stating a bunch of files, then benchmark with ab or something better. [0] https://github.com/petkaantonov/bluebird/blob/master/docs/do...
comment by phpnode · 2016-06-02 · in Async and Await -
promisifyAll is _blazing_ fast because it does this: https://github.com/petkaantonov/bluebird/blob/master/src/pro... It builds a function dynamically and then compiles it and lets the JIT optimize it - it incurs very little overhead. This…
comment by inglor · 2016-06-02 · in Async and Await -
…that thinko I showed my lack of Swift experience: in Rust reflection is done with macros. [2] https://github.com/petkaantonov/bluebird/wiki/Optimization-k...
comment by comex · 2016-05-23 · in Dynamic Swift -
…we're at nicking stuff from Go using generators, our latest effort is adding defer in bluebird :) https://github.com/petkaantonov/bluebird/issues/1014 Its almost done [1], we just want to also support auto-disposable objects so that you…
comment by spion · 2016-03-25 · in ES7 async functions – a step in the wrong direction (2015) -
…-> https://www.npmjs.com/package/dataframe , http-client -> https://github.com/mzabriskie/axios + https://github.com/petkaantonov/bluebird , etc.
comment by sandGorgon · 2016-03-25 · in Stencila – Spreadsheet-like live reactive programming environment -
…in CoffeeScript [4]. [1] http://redmonk.com/dberkholz/2013/03/25/programming-language... [2] https://github.com/petkaantonov/bluebird [3] http://programmers.stackexchange.com/questions/278778/why-ar... [4] https://github.com/atom/atom
comment by kenOfYugen · 2016-03-12 · in State of the Art JavaScript in 2016 -
…I just mentioned: automatic resource cleanup[1], cancellation, yield handlers.. don't you? 1. https://github.com/petkaantonov/bluebird/issues/1014
comment by esailija · 2016-02-26 · in Node 5.7.0 (stable) released -
…feature. Though generators have been added, and they are currently optimization killers in V8: https://github.com/petkaantonov/bluebird/wiki/Optimization-k...
comment by ChrisAntaki · 2016-02-26 · in Node 5.7.0 (stable) released -
…4. https://github.com/facebook/react/issues/5197#issuecomment-1... 5. https://github.com/petkaantonov/bluebird/wiki/Optimization-k... 6. https://github.com/AmpersandJS/ampersand-state/pulls?utf8=%E...
comment by STRML · 2016-02-05 · in Performance Engineering with React, Part 1 -
…not because it's easy or because the language forces it, but just because V8 is the engine. [0] - https://github.com/petkaantonov/bluebird/wiki/Optimization-k...
comment by dsp1234 · 2016-01-13 · in ChakraCore GitHub repository is now open -
You're making use of the deferred anti-pattern [0] on your own profile page [1]. [0] https://github.com/petkaantonov/bluebird/wiki/Promise-anti-p... [1] https://pocketsquare.io/alanfriedman
comment by Kudos · 2015-10-08 · in Show HN: Pocketsquare – portfolios for developers -
…detection, it's easy to get burned by forgetting to handle a rejection case, or use `.done()`. [1] https://github.com/petkaantonov/bluebird/blob/master/API.md#... [2] https://github.com/petkaantonov/bluebird/blob/master/API.md#...
comment by munro · 2015-10-04 · in Side Effects vs. Promises -
…promises useful in nodejs. For example, we would have to remove this entire section in Bluebird: https://github.com/petkaantonov/bluebird/blob/master/API.md#... and instead fall back to process crashing and restarting. Lack of error…
comment by spion · 2015-10-02 · in Microsoft Edge gets native ECMAScript 7 async/await support in latest build -
The one readily available on search: https://github.com/petkaantonov/bluebird/wiki/Optimization-k... Otherwise the fact that engines bailout on optimizing ES6 features was kind of common knowledge when engines started to implement them.
comment by maga · 2015-09-09 · in Node v4.0.0 -
Try bluebird's Promise.coroutine, I use it everywhere and it works great. https://github.com/petkaantonov/bluebird/blob/master/API.md#...
comment by ivank · 2015-09-08 · in Node v4.0.0 -
…by bluebird quietly eating exceptions on at least one codebase. I fixed it by re-throwing them via: https://github.com/petkaantonov/bluebird/blob/master/API.md#... edit: bluebird also exposes a process-level event, now, too!
comment by elliotf · 2015-07-17 · in Error Handling in Nodejs -
…promises with values, we've offered this technique in Bluebird for years now as an example in https://github.com/petkaantonov/bluebird/blob/master/API.md (see under "Using defaultPromisifier parameter to add enhancements on top of normal…
comment by inglor · 2015-06-25 · in Pseudosynchronous JavaScript -
…I've heard is that they aren't cancellable, which is legit. There are proposals for that, though ( https://github.com/petkaantonov/bluebird/blob/master/API.md#... ). At least with Promises functions actually return, as opposed to the…
comment by phs2501 · 2015-05-22 · in Node.js: Cluster vs. Async -
…http://docs.hhvm.com/manual/en/hack.async.asyncawait.php [5] https://lwn.net/Articles/643786/ [6] https://github.com/petkaantonov/bluebird/blob/master/API.md#... [7] https://github.com/kriskowal/q/tree/v1/examples/async-genera... [8]…
comment by tlrobinson · 2015-05-22 · in Node.js: Cluster vs. Async -
If you have a suggestion for warnings please open an issue https://github.com/petkaantonov/bluebird/issues If you want to contribute we'd love docs contributions as you clearly have good technical writing. Here are the 3.0 docs (currently…
comment by inglor · 2015-05-18 · in We have a problem with promises -
…synchronously, and cases where the promise rejects with an error. One place this is mentioned is: https://github.com/petkaantonov/bluebird/wiki/Promise-anti-p...
comment by loganfsmyth · 2015-05-18 · in We have a problem with promises -
…called elsewhere and expect a callback style. I'm sure there are many more. This is my bible: https://github.com/petkaantonov/bluebird/blob/master/API.md In short; use Promises! They are the answer for callback hell in Node. Async/await…
comment by STRML · 2015-05-18 · in We have a problem with promises -
…using. For instance, with bluebird[0]: d3.json = require('bluebird').promisify(d3.json); [0]: https://github.com/petkaantonov/bluebird
comment by couchand · 2015-05-15 · in Replacing jQuery with D3 -
…very similar to async/await, without relying on experimental features. https://github.com/tj/co or https://github.com/petkaantonov/bluebird/blob/master/API.md#...
comment by voxtex · 2015-05-10 · in Syncify.js – Eliminates the need for callbacks in the browser -
…didn't start until Sept 2013 [2]. [1] https://github.com/douglascrockford/RQ/commits/master [2] https://github.com/petkaantonov/bluebird/commits/master?page...
comment by latchkey · 2015-04-14 · in RQ – A small JavaScript library for managing asychronicity -
…implementations, it should be. Bluebird already has the timeout function with similar semantics. https://github.com/petkaantonov/bluebird/blob/master/API.md#...
comment by 15155 · 2015-04-14 · in RQ – A small JavaScript library for managing asychronicity -
Also, you can just use Bluebird's .error() for catching "operational errors": https://github.com/petkaantonov/bluebird/blob/master/API.md#... Where an operational error "represents an error (that) is an explicit promise rejection as…
comment by idbehold · 2015-04-07 · in Stop Trying to Catch Me -
…of boilerplate Bluebird has an overload of catch() that takes in a parameter for the error class. https://github.com/petkaantonov/bluebird/blob/master/API.md#... >I don't care about losing the stack (which is inherent in any async work).…
comment by Arnavion · 2015-04-07 · in Stop Trying to Catch Me -
…it matters, promisifyAll does the same thing, but also looks for child functions to promisify. [1] https://github.com/petkaantonov/bluebird/blob/master/API.md#...
comment by jamesrom · 2015-01-28 · in Node.js Flow – Callback Hell vs. Async vs. Highland Streams -
...and you can also have something like that using Bluebird.coroutine() ( https://github.com/petkaantonov/bluebird/blob/master/API.md#... ) or co ( https://github.com/tj/co , see also https://github.com/koajs/koa )
comment by drapper · 2015-01-28 · in Node.js Flow – Callback Hell vs. Async vs. Highland Streams -
Note that with statements kill performance, at least in V8. https://github.com/petkaantonov/bluebird/wiki/Optimization-k...
comment by eurleif · 2014-11-29 · in Ramda – A practical functional library for Javascript -
…2. node-debug from node-inspector [2] as a debugger (same UI and features as chrome dev tools) [1]: https://github.com/petkaantonov/bluebird [2]: https://github.com/node-inspector/node-inspector
comment by spion · 2014-11-26 · in Yahoo Mail moving to React -
…as when.js( https://github.com/cujojs/when ), q ( https://github.com/kriskowal/q ), and bluebird ( https://github.com/petkaantonov/bluebird ). Not to mention the Async library ( https://github.com/caolan/async ) which is full of tools to…
comment by CitizenKane · 2014-11-26 · in Yahoo Mail moving to React -
…`$q.defer()` is when you're wrapping a non-promise API. The bluebird library has a nice write-up: https://github.com/petkaantonov/bluebird/wiki/Promise-anti-p...
comment by timruffles · 2014-11-12 · in How we built our app in 2 weeks using Ionic Framework -
…BB and promises in general. A well-written guide would be a great star on your friend's resume. [0] https://github.com/petkaantonov/bluebird
comment by RKoutnik · 2014-09-25 · in Ask HN: Open-source projects that could use documentation help? -
…to Promises, which I have grown to really love in the last few months - especially since bluebird ( https://github.com/petkaantonov/bluebird ) handles errors really sanely. It takes a lot of getting used to but it is really, really nice to…
comment by STRML · 2014-09-19 · in Handling Errors in IcedCoffeeScript -
…reading an article about how using Array.proto.slice on arguments will not get optimised by V8. https://github.com/petkaantonov/bluebird/wiki/Optimization-k...
comment by j03w · 2014-08-28 · in Fastest way to slice arguments in JavaScript -
…object. If you haven't yet, please do check out Petka Antonov's Optimization Killers [0]. [0]: https://github.com/petkaantonov/bluebird/wiki/Optimization-k...
comment by couchand · 2014-08-19 · in A JavaScript Quality Guide -
…I'm curious to compare approaches :-) - mine is a sweet.js macro: http://pastie.org/9410315 (uses https://github.com/petkaantonov/bluebird and https://github.com/BranchMetrics/promise-accum ). The basic syntax would be: task { item1 <-…
comment by dmitrig01 · 2014-08-16 · in Show HN: I built an extension of JavaScript in a day -
…672 80.59 promises-cujojs-when.js 731 68.74 callbacks-caolan-async-waterfall.js 733 44.57 [1]: https://github.com/petkaantonov/bluebird/blob/master/benchma...
comment by danabramov · 2014-07-27 · in Contra – Asynchronous flow control with a functional taste to it