5 ms·
Bluebird is mainly designed for node (V8) and promise performance can make a massive difference on the server. On the client there tend to be fewer async calls
by phpnode 10y ago
Bluebird is mainly designed for node (V8) and promise performance can make a massive difference on the server. On the client there tend to be fewer async calls and so promise performance is usually less of a factor, but obviously, it depends what you're doing.
- Touche 10y ago> promise performance can make a massive difference on the server. Great, got data on the type of difference?
- phpnode 10y agoCheck out the Bluebird benchmarks [0], or you can easily try it for yourself - create a simple web server which does some 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/docs/benchmarks.md https://github.com/petkaantonov/bluebird/blob/master/docs/do...
- Touche 10y agoWhy should I do the work, you made the claim?
- phpnode 10y agoBy the same token, why do I owe you any further evidence?
- Touche 10y agoYou haven't provided any evidence so far. You owe evidence because you made a claim. If you are unsure whether Bluebird's Promise performance makes a difference in a real-world scenario, why make such a claim?
- phpnode 10y agoYou are asking a question, I do not owe you an answer, it's up to you to find out whether this stuff matters for your use case. I've done these tests myself, it is trivial for you to do the same. Do your own homework.
- Touche 10y ago> You are asking a question, I do not owe you an answer I agree! But you did answer it: > Bluebird is mainly designed for node (V8) and promise performance can make a massive difference on the server. If I'm sacrificing simplicity (by using a non-native Promise implementation with a very large API) because of performance improvements, I want data (proof) of these performance improvements. If you don't have the data that's fine! No harm done, I'll keep waiting until someone does.
- spion 10y agoWhich they provided by linking to the benchmark/data.
- esailija 10y agoThis is a thing you can just infer. If it takes 100ms CPU time to process 10 promises and 1 request involves creating 10 promises, the server can then only handle 100 requests per second at theoretical max. IO time doesn't matter as much (for throughput) because IO is asynchronous so the server is free to process other requests while waiting for it. But CPU time is only being used for 1 thing at at time. So to get e.g. 10k rps out of a node server, handling 100000 promises must take well under a second of CPU time. Looking at the benchmark results you can see how many implementations will bottleneck this.