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

Improve performance a lot #13

Merged
merged 3 commits into from
Mar 28, 2023
Merged

Conversation

rangoo94
Copy link
Contributor

We have experienced performance problems with the carriage returns escaping in kubeshop/testkube#3522. To solve the problem, I've improved the performance of this library.

Benchmarks

Before
$ node test/benchmark.js
With carriage: 4.586308136100013
Without carriage: 0.003953090100024565
After
$ node test/benchmark.js 
With carriage: 0.13167581839999964
Without carriage: 0.002920525800000701

test/index-spec.js Outdated Show resolved Hide resolved
Copy link
Owner

@lgeiger lgeiger left a comment

Choose a reason for hiding this comment

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

Thank you very much for improving the performance of this function. This is an huge gain 🙏 🎉

I only have two a minor comments other than that this looks great!

index.js Outdated Show resolved Hide resolved
test/index-spec.js Outdated Show resolved Hide resolved
rangoo94 and others added 2 commits March 28, 2023 08:55
@rangoo94
Copy link
Contributor Author

Thank you @lgeiger, I've just updated the solution based on your review :)

@rangoo94 rangoo94 requested a review from lgeiger March 28, 2023 07:01
Copy link
Owner

@lgeiger lgeiger left a comment

Choose a reason for hiding this comment

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

Great! Thank you so much for the PR 🚀

@lgeiger lgeiger merged commit e697184 into lgeiger:master Mar 28, 2023
@lgeiger
Copy link
Owner

lgeiger commented Mar 28, 2023

Turns out I don't have my npm 2FA authenticator with me at the moment I will release a new patch tonight.

@lgeiger
Copy link
Owner

lgeiger commented Mar 28, 2023

Published as v1.3.1 🚀

Thanks again for the PR!

@rangoo94
Copy link
Contributor Author

Thanks a lot for the quick release! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants