Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(debounce): remove tryCatch/errorObject for custom tryCatching #1254

Closed
wants to merge 1 commit into from

Conversation

kwonoj
Copy link
Member

@kwonoj kwonoj commented Jan 27, 2016

This PR applies approach to remove custom trycatcher on debounce operator.

Numbers are

before
debounce - immediate |  5,530 (±7.51%) |      23,628 (±3.99%) |   4.27x |   327.3%

after
debounce - immediate |  5,593 (±9.91%) |      27,302 (±2.89%) |   4.88x |   388.1%

not sure if this can be considered noticeable improvement.

@kwonoj
Copy link
Member Author

kwonoj commented Jan 29, 2016

I'll check this in around later today if there isn't any suggestion.

} catch (err) {
this.destination.error(err);
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @Blesh's suggestion on #1266 (comment) also applies here. (To move the try/catch block to a separate function.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct. A function that had the bare minimum try catch implementation in it. All other logic in other functions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, will update PR accordingly.

@kwonoj
Copy link
Member Author

kwonoj commented Feb 1, 2016

Updated PR to separate trycatch as function.

@kwonoj
Copy link
Member Author

kwonoj commented Feb 2, 2016

Merged with 90bf3f1.

@kwonoj kwonoj closed this Feb 2, 2016
@kwonoj kwonoj deleted the refactor-debounce branch February 2, 2016 08:48
@lock
Copy link

lock bot commented Jun 7, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants