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

Sort speedup submit to upstream #67

Conversation

matthewbaker-auditboard

Native javascript sort of already-sorted arrays w/ custom comparators is known to be pathologically slow. We observed this behavior adding significant startup time to our application. Substituting an insertion algorithm based on binary search reduced startup time by several seconds.

@cjihrig
Copy link
Contributor

cjihrig commented Aug 19, 2021

This has CI failures due to linting.

Substituting an insertion algorithm based on binary search reduced startup time by several seconds.

How big of an array are you sorting, and do you have any benchmarks that could accompany a change like this?

@kanongil
Copy link
Contributor

kanongil commented Aug 19, 2021

How big of an array are you sorting, and do you have any benchmarks that could accompany a change like this?

Indeed. I'm also curious. Afaik, hapi is mostly optimized towards runtime performance. Adding new logic that only optimizes the boot process needs some extra weight behind it.

@devinivy
Copy link
Member

devinivy commented May 8, 2022

We appreciate the contribution! I am closing for now due to inactivity, but would be open to considering a change like this if we can back it up with some numbers, and with adjustments so that hapi's linter is satisfied.

@devinivy devinivy closed this May 8, 2022
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.

4 participants