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: small improvements #94

Merged
merged 4 commits into from
Nov 13, 2023
Merged

perf: small improvements #94

merged 4 commits into from
Nov 13, 2023

Conversation

Yovach
Copy link
Contributor

@Yovach Yovach commented Nov 12, 2023

I think these changes will bring small performance improvements because :

  • the split function call will stop when we've retrieved the 2 elements we're using. It also prevents people from putting unnecessary elements in the Range header, which can affect performance.
  • Reduce multiple assignments on start and end variables
  • Call the ReadableStream.getReader function only if the Writable is not destroyed.

@yusukebe
Copy link
Member

Hi @Yovach

Thanks. This is a good fix. LGTM!

@yusukebe yusukebe merged commit 3575d60 into honojs:main Nov 13, 2023
3 checks passed
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.

2 participants