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: remove unused properties from radix #435

Merged
merged 2 commits into from
Jul 11, 2023

Conversation

H4ad
Copy link
Contributor

@H4ad H4ad commented Jul 4, 2023

There is currently no reason for radix to have an id or parent property, so can we remove it?

This breaks a test in dataset.test.ts, but breaks the order of the snapshot, from what I can see the documents are just being returned in a different order than expected.

@vercel
Copy link

vercel bot commented Jul 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
orama-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 11, 2023 0:19am

@micheleriva
Copy link
Member

@H4ad tests are not passing, but I can't understand how this refactor could affect pagination results

@H4ad
Copy link
Contributor Author

H4ad commented Jul 10, 2023

@micheleriva Probably is due the default sort is not stable: https://medium.com/@fsufitch/is-javascript-array-sort-stable-46b90822543f

@micheleriva
Copy link
Member

@allevo any thoughts here?

@allevo
Copy link
Collaborator

allevo commented Jul 11, 2023

I'm not worried about it. The sorting feature has a dedicated test suite, so it is preserved.
NB: the scores are the same for all documents

@H4ad could you fix the test suite?

Copy link
Member

@micheleriva micheleriva left a comment

Choose a reason for hiding this comment

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

LGTM

@micheleriva micheleriva merged commit 5fcc4bd into oramasearch:main Jul 11, 2023
@H4ad H4ad deleted the perf/simplify-radix branch July 11, 2023 13:33
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.

3 participants