Hacker GitHub

← All repos

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

Mentions per year 87 mentions · busiest year 2014 (33)
20082026
  1. …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
  2. …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
  3. …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
  4. …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...
  5. …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!
  6. 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
  7. 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)
  8. …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
  9. …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
  10. ▲ 1
    V8 Optimization killers
    story by dolftax · 2016-09-19 · 0 comments
  11. 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...
  12. ▲ 2
    Promise anti patterns
    story by shadowfax92 · 2016-07-29 · 0 comments
  13. …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
  14. 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
  15. ▲ 4
    V8 Optimization Killers
    story by maxehnert · 2016-06-01 · 0 comments
  16. …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
  17. …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…
  18. …-> https://www.npmjs.com/package/dataframe , http-client -> https://github.com/mzabriskie/axios + https://github.com/petkaantonov/bluebird , etc.
  19. …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
  20. …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
  21. …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
  22. …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...
  23. …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
  24. ▲ 2
    V8 JavaScript optimization killers
    story by apo · 2015-10-12 · 0 comments
  25. ▲ 2
    Nodejs optimization killers
    story by fnaticshank · 2015-10-12 · 0 comments
  26. 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
  27. ▲ 2
    JS Optimization killers
    story by dmmalam · 2015-10-07 · 0 comments
  28. …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
  29. …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…
  30. 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
  31. 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
  32. …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
  33. …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
  34. …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
  35. …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
  36. 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
  37. …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
  38. …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
  39. …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
  40. …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#...
  41. …didn't start until Sept 2013 [2]. [1] https://github.com/douglascrockford/RQ/commits/master [2] https://github.com/petkaantonov/bluebird/commits/master?page...
  42. …implementations, it should be. Bluebird already has the timeout function with similar semantics. https://github.com/petkaantonov/bluebird/blob/master/API.md#...
  43. 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
  44. …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
  45. …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#...
  46. ...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 )
  47. Note that with statements kill performance, at least in V8. https://github.com/petkaantonov/bluebird/wiki/Optimization-k...
  48. …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
  49. …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
  50. …`$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...