fix: reduce agenda data calculation time - #4622
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4622 +/- ##
==========================================
- Coverage 88.39% 88.39% -0.01%
==========================================
Files 296 296
Lines 39741 39707 -34
==========================================
- Hits 35130 35098 -32
+ Misses 4611 4609 -2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
jennifer-richards
left a comment
There was a problem hiding this comment.
This looks fine.
It is possible for a session to have order_number = None if session.group is None. I don't think those should be showing up in the schedules, but it might cause bad links if it does. Could fall back to 0 if it comes up instead of propagating the None.
Other thought - it'd be good to update the comment on preprocess_assignments_for_agenda() to document that it's setting the order_number.
Session is defined such that Django will not allow session.group to be None. |
This intentionally leaves a commented out debug statement. Against main without #4621, it will report differences with the secretariat group. It will report equal once #4621 is in place.
I had done the work to precalculate the order in the view, but while investigating what led to #4621, discovered that the calculations had already been made and attached to the objects.
It's not clear why it wasn't being used.