MatAtBread / fast-async

605 stars 21 forks source link

Warning: a promise was created in a handler at eval at processIncludes #27

Closed Rush closed 7 years ago

Rush commented 7 years ago

Not sure if this is relevant but when I changed my config to fast-async I started getting such warnings from bluebird:

(node:22057) Warning: a promise was created in a handler at eval at processIncludes (/code/project/node_modules/nodent-runtime/runtime.js:1:0), <anonymous>:3:4642 but was not returned from it, see http://goo.gl/rRqMUw

I'd rather not disable the warning itself as it may be useful on other occasions.

Do you think it's a problem in fast-async? or maybe in bluebird? or maybe the change has just uncovered my own bug...

matAtWork commented 7 years ago

I'd really like to find out. Is it possible to get a bit more of the stack trace?

Rush commented 7 years ago

Unfortunately there is no more stacktrace.

MatAtBread commented 7 years ago

Can you provide a minimal case that produces the same message?

matAtWork commented 7 years ago

If you can pin this down to a minimal case, please let me know, otherwise I'll close it in a day or two as not-reproducible. Thanks.

Rush commented 7 years ago

Weirdly enough, after applying the fix from https://github.com/MatAtBread/fast-async/issues/29 this issue went away. Sorry for not providing a small reproducible test-case as it was not trivial. I will re-open this issue if stumble upon this problem again.

Thanks for all the good work and have a great weekend.

PS. I'm getting about 4x speed up vs babel+bluebird for some recurring operations in my application. Great project. :) PS2. I also quickly benchmarked native async/await in Node 7 and it appears it's around 10% slower than babel+bluebird. It appears fast-async will not stop being relevant.

matAtWork commented 7 years ago

Yep, still a long way to go to get generators faster. With node v7, raw performance results still favour nodent by about 3 times:

node --harmony-async-await ./nodent.js tests tests/semantics/perf.js
Total compile time: 214ms
- Test: perf using promiscuous

                                                      {es7:true}          nodent          native        bluebird            rsvp            when   promisejs.org     promiscuous
                  Compiler flags            Mean             159             413             576             539             443             445             406             929
               lazyThenables,es7             100             100               -               -               -               -               -               -               -
                             es7             143             143               -               -               -               -               -               -               -
     lazyThenables,wrapAwait,es7             223             223               -               -               -               -               -               -               -
                   wrapAwait,es7             170             170               -               -               -               -               -               -               -
                        promises             374               -             148             542             386             255             238             154             893
              promises,noRuntime             335               -             123             497             339             214             195             133             846
              wrapAwait,promises             502               -             181             534             448             256             268             177            1652
    wrapAwait,promises,noRuntime             442               -             161             495             393             217             222             155            1450
                      generators             779               -             802             767             846             704             711             684             936
            wrapAwait,generators             831               -             658             773             863             701             725             682            1414
                 engine,promises             525               -             519             536             532             519             520             514             533
       engine,promises,noRuntime             524               -             513             533             531             521             521             526             526
       engine,wrapAwait,promises             522               -             514             536             522             520             519             517             524
ine,wrapAwait,promises,noRuntime             525               -             513             544             528             521             531             522             516

Benchmark execution time: 0.860078 ms