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

Reordering large lists is slow #198

Closed
aaroncraigongithub opened this issue Apr 8, 2016 · 3 comments
Closed

Reordering large lists is slow #198

aaroncraigongithub opened this issue Apr 8, 2016 · 3 comments

Comments

@aaroncraigongithub
Copy link

On a large list, something like move_to_top will trigger changes on every item in the list, which seems like overkill in most use cases.

If the :position field is a float, wouldn't it be easier to leverage more granularity in the position value so that moving an item in the list would affect only that single item?

That is, if my current list positions are 1, 2, 3 and I move 3 to the top, my new state could be 0.99, 1, 2, leaving the other two items in the list untouched.

I'm happy to work on a PR for this if it seems like something that would be acceptable.

@brendon
Copy link
Owner

brendon commented Apr 10, 2016

Hi @aaroncraigongithub, in my applications position is an integer. I think most developers do it that way. I guess you could have a detection of the type and act appropriately.

However, what I think you want is this: https://github.com/mixonic/ranked-model

Unfortunately it looks like it's dead (or hibernating!) which is a shame because I've used it in one of my projects too.

@brendon
Copy link
Owner

brendon commented Apr 17, 2016

@aaroncraigongithub, I'm going to close this for now. Feel free to continue the discussion here though.

@brendon brendon closed this as completed Apr 17, 2016
@raimo
Copy link

raimo commented Apr 22, 2016

This is a really weird situation we have here – very sad ranked-model is not maintained. :)

Probably a cool project for someone to create a partial fork of both.

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

No branches or pull requests

3 participants