Skip to content

waterfall performance #40

@scriby

Description

@scriby

I did some performance testing and noticed that waterfall has quite a bit more overhead than series (about 5x). I would guess it's because it uses nextTick between each step in the waterfall.

Is nextTick there to prevent the call stack from growing out of control? I think you can call the next step directly, but keep track of how many calls have been made in the waterfall, and once it reaches are certain point (around 50?), dispatch the next call using nextTick. That should reduce the overhead associated with nextTick and still prevent the call stack from growing out of control.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions