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

Add order by ascent count function to line list #382

Open
dorthrithil opened this issue Jun 9, 2024 · 0 comments
Open

Add order by ascent count function to line list #382

dorthrithil opened this issue Jun 9, 2024 · 0 comments
Labels
enhancement Improves existing features

Comments

@dorthrithil
Copy link
Contributor

After changing the ascent count to a hybrid property, it is not trivial anymore to order by ascent counts. For the ORM to resolve this, we need a hybrid property expression and this has to compute the ascent count for every line there is for ordering to work - which is performing badly.

To solve it, I see no other way then adding back the ascent count column and incrementing and decrementing it in the ascent routes. This will not collide with the secret spot issues we had (wrong ascent counts if you're not logged in and can't see secret ascents) as secret lines can only be seen by logged in users - in contrary to public crags with secret lines.

Also an idea would be to change back to the increment / decrement approach again completely and keep two props: ascent count and secret ascent counts. This would speed up the routes again and be consistent across all entities.

@dorthrithil dorthrithil added the enhancement Improves existing features label Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves existing features
Projects
None yet
Development

No branches or pull requests

1 participant