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

Replace memoizee with a simpler alternative #152

Merged
merged 5 commits into from
Feb 22, 2021
Merged

Replace memoizee with a simpler alternative #152

merged 5 commits into from
Feb 22, 2021

Conversation

kibertoad
Copy link
Collaborator

memoizee brings in 6 dependencies, that are completely irrelevant for openapi-validator-middleware use-case, as we are not using any expiration policy. This change makes the implementation more lambda-friendly and also helps when bundling with nexe.

@kibertoad kibertoad requested a review from kobik February 5, 2021 17:20
@kibertoad
Copy link
Collaborator Author

@kobik Any chance you could fast-track review for this? It's a blocking issue for us :-/

@kobik
Copy link
Collaborator

kobik commented Feb 9, 2021

hey @kibertoad my man, have you used nano-memoize before?

@kibertoad
Copy link
Collaborator Author

@kobik I did not, why? Can you recommend another minimalistic memoization solution?

@kobik
Copy link
Collaborator

kobik commented Feb 9, 2021

no, i haven't.

just wondering whether to go with micro-memoize which has 150K downloads or this one with 5k downloads.

@kibertoad
Copy link
Collaborator Author

@kobik micro-memoize is 4 times larger and works 2 times slower according to benchmarks, but I'm OK with changing libraries if you recommend it.

@kibertoad
Copy link
Collaborator Author

I can benchmark myself as well

@kobik
Copy link
Collaborator

kobik commented Feb 9, 2021

I don't have a strong opinion about either one of them.

Just want to make sure it's working correctly.

@kibertoad
Copy link
Collaborator Author

@kobik I'll write some tests.

@kobik
Copy link
Collaborator

kobik commented Feb 10, 2021

thanks @kibertoad

@kibertoad
Copy link
Collaborator Author

@kobik Done!

@kibertoad
Copy link
Collaborator Author

@kobik Could you please take a look?

@kobik kobik merged commit 466fbef into master Feb 22, 2021
@kobik kobik deleted the fix/memoizee branch February 22, 2021 11:31
@kibertoad
Copy link
Collaborator Author

@kobik Could you publish a new version with this? #153 will be a semver major, so it's not worth it to wait for it.

@kobik
Copy link
Collaborator

kobik commented Feb 22, 2021

published

@kibertoad
Copy link
Collaborator Author

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants