-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
Improve global request performances #354
Improve global request performances #354
Conversation
Signed-off-by: Quentin Guidée <[email protected]>
Signed-off-by: Quentin Guidée <[email protected]>
Signed-off-by: Quentin Guidée <[email protected]>
I don't know what you think about the userMetric thing in the app. I think it's not available anymore but it used to allow people to choose between choosing from "Count" or "Duration". It makes frontend more complex and requests more complex too so maybe we should stick to one or always do both. |
Actually in my opinion that's something to consider and to keep since both are useful and different statistics. For now for this PR I'll keep the requests as they are, because each deep modifications of the requests should probably have their own PR and discussions. I'll dedicate this PR to late Also, I think that this filter can be more pertinent in places like Ultimately, the
I think this approach might be is more RESTful |
Signed-off-by: Quentin Guidée <[email protected]>
Yeah I agree with you but in the end they define a use case that has to be present in the app. I feel like query flexibility should be linked to frontend graph flexibility. As of today you cannot customize graphs much so there's not real need for that. |
For this specific frontend yep, but anyone that want to use the API for its own frontend can't really use it except if it reproduces the exact same views. If I want to make a small utility or script that uses my stored listening history, I cannot do that without editing the server (except if the queries are used by the yourspotify frontent). |
Signed-off-by: Quentin Guidée <[email protected]>
Ok yeah I can understand, I just feel like we should put minimal effort on this on our way to performances. |
Signed-off-by: Quentin Guidée <[email protected]>
Signed-off-by: Quentin Guidée <[email protected]>
Signed-off-by: Quentin Guidée <[email protected]>
Signed-off-by: Quentin Guidée <[email protected]>
Artists/Albums/Tracks pages and ranking are instantaneous now 🚀 That's really cool to navigate |
Hey, really nice work! However I can't seem to find the functions getRank, getBest and the itemTypes enum? Is there anything I'm missing? |
export type ItemType = { | ||
field: string; | ||
}; | ||
|
||
export const itemTypes: { | ||
[key in "track" | "album" | "artist"]: ItemType; | ||
} = { | ||
track: { | ||
field: "$id", | ||
}, | ||
album: { | ||
field: "$albumId", | ||
}, | ||
artist: { | ||
field: "$primaryArtistId", | ||
}, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is here! Idk why github is collapsing this file in the diff
Signed-off-by: Quentin Guidée <[email protected]>
Signed-off-by: Quentin Guidée <[email protected]>
Looks awesome, I love stats and numbers haha! Do the requests follow the interval given on top? Are you ready for a merge? |
Yeah the intervals are from the header! Yep it's ready. There are still improvements that we can do but that'll be enough for this one! |
Are you working on anything specific right now? I feel like I could give some requests a try too. |
No, everything for now was in this pr 👍 |
You inspired me #355 haha |
Benchmarks: #354 (comment)