-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Feat/Ignored before card count #3910
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
Conversation
|
@user1823 Would you mind reviewing this for me? |
user1823
left a comment
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.
Looks great. Left two suggestions.
Co-authored-by: user1823 <[email protected]>
|
I like the improved info for users, but am not very fond of the current approach:
What if instead, the optimization routines kept track of included/excluded cards, and returned them at the end of optimization? A message could then be shown as optimization completes indicating the number of cards that were included/excluded. It would mean we can re-use existing codepaths, and the performance impact over what we currently have would be negligible. We already show the review count, so this info could be shown next to it. WDYT? |
|
So if I understand you correctly, you want to show the number of included and total cards after optimization? I see two problems with that:
|
Does this matter if its loaded asynchronously? I don't think it would block the user from interacting with the page while it is loading so it shouldn't matter right?
Another option I was considering would be to instead of calling the back-end several times, have the list of
I'm personally happy with the value being an approximation rather than the exact correct value. Unless there are radical changes to the way ignore-reviews-before works, I can't foresee the SQL becoming terribly inaccurate even if it is ignored when future changes are made.
I'm sorry, I can't think of anything that can be done about this 😄.
I could see that working as a compromise. A like message would probably still prevent people from misconstruing how ignore-reviews-before works. I do personally much prefer the message as it currently exists though. Your call ofc. |
|
Why is calling the backend multiple times an issue? Is that bad coding practise? |
Oops I miss-read as well. The problem here is that the back-end is being called multiple times every time the value is changed once. |
|
Even with this SQL, we are not being 100% accurate (some cards may have incomplete review history, and thus ignored) and the heavy SQL query is introducing a host of issues (as pointed out by dae). So, I was thinking that we should just switch back to the simple SQL that Luc used initially and then show a message like the following Edit: Let's not round off the numbers. The error in estimation even with the simple query is likely to be very small and may be even 0. Rounding off will be more harmful than useful. The ~ already suggests that the numbers may not be 100% accurate.
Is this important? The goal of the PR is just to demonstrate the effect of the ignore cards before option. |
9a89a1f to
03bf123
Compare
|
I've reverted to a version which has a more approximate but faster SQL (#3910 (comment)) and removed caching. I've also fixed the problem with multiple calls to the back-end. Would this be ok for you? |
|
I like that you've fixed the duplicate calls, and simplified the SQL. If we have to maintain two separate paths, then having one that only tries to be a rough approximation and is not expect to be identical is going to be easier to maintain. I tested this on a reasonably large collection with a beefy machine from this year, and each call is about 35ms. On slower devices and more extreme collection sizes, it's definitely going to be a noticeable delay. I don't think users should be paying that cost when they don't need it, such as:
|
Oh I meant that I thought it was already done asynchronously. Does it cause unresponsiveness when you open the deck config?
Personally, I'm a little concerned that people that have set this option to something wrong before this update will then fail to notice it but It's better than causing lag I suppose. 8ef5d6d
Done! 3fd6e82 |
|
Thank you for the quick fixes! A gentle reminder about camelCase being the convention. It doesn't cause a noticeable startup delay on my system, but we have a responsibility not to burn users' CPU cycles unnecessarily. I appreciate your point about helping existing users notice though, and as a compromise, I've temporarily disabled that logic - we can enable it again in a future update. |
Continuation of #3907
Peek.2025-04-09.01-07.mp4
Displays the number of cards that will be ignored by ignore cards reviewed before to hopefully abate some confusion.