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

Ability to sort large files #4

Open
dim opened this issue Apr 3, 2021 · 2 comments
Open

Ability to sort large files #4

dim opened this issue Apr 3, 2021 · 2 comments

Comments

@dim
Copy link

dim commented Apr 3, 2021

I was looking to add a CLI extension to our very own lib https://github.com/bsm/extsort, until I stumbled across omegasort. It seems to support pretty much everything we need except that it is limited to memory and cannot operate on arbitrarily large files/streams.

Would you consider integrating extsort instead of reading all lines into memory? It should be a relatively trivial addition.

@autarch
Copy link
Member

autarch commented Apr 3, 2021

Would you consider integrating extsort instead of reading all lines into memory?

Yes, definitely. I'd actually thought on on-disk sorting as a possible option before, but I'd never looked into it.

I think it'd be best to just make this an additional CLI option for now. Is this something you'd be interesting in making a PR for?

@autarch
Copy link
Member

autarch commented Apr 24, 2021

This was a comment from back when omegasort was implemented in Go. This is no longer relevant.


I'm taking a look at extsort and I see one impedance that might make integrating it challenging. My code uses sort functions with the signature func(i, j int) bool. The i and j arguments are slice indexes into the data being sorted. Internally, all of the functions are operating on a []string slice.

I think the right approach would be to make the omegasort sorters work like extsort, since they're all in an internal package with no public API.

@autarch autarch transferred this issue from houseabsolute/omegasort-go May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants