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
Resources Accessed view times out and does not load the bar chart in some courses #1466
Comments
Time out has been increased in beta and test and is ready for testing. This works in test. The bar chart loads. |
For the next release, limit the number of files that display to 100. Make this configurable for admins. Add the ability to filter resources I've viewed and resources I have not viewed. |
So this is proving to be a little tricky because the calculations for I've so far for this course been able to reduce it from about 30 seconds to 10 on my local PC if I sort and cut at the end, which is going to be slower on the server. I'm not sure how to fix this much without a rewrite to move this logic into the SQL. And depending on where I take the head, the I guess this speed improvement is better than nothing but perhaps it's possible for this percent calculation to be in the SQL. |
I kind of feel like this might be the best we can easily do here, just let it do all the computations and filter at the very end. This at least does save a lot of time on the client and makes it seem like it's faster. This is where most of the slowdown is. I think optimizing the client and server are separate independent problems. Nevermind, it looks like the slowdown locally might have just because I had debugging on. This seems pretty fast on the server, it's all just slow on the client. I'm going to remove the debug so it's not accidentally run. |
Test Plan:
Verify that there are more results in the unlimited case |
Display this limit to the user
Display this limit to the user
This looks good in testing. I can change the default for how many resources display for courses. The message on the page also displays correctly depending on whether there is limit or all resources are displaying. |
Expected behavior (A description of what you expected to happen) :
Resources Accessed view loads a bar chart showing the percent of students who viewed resources during the selected timeframe.
Describe the bug (Tell us what happens instead of the expected behavior) :
For certain courses, the view does not load the bar chart. Developer tools shows a 504 gateway timeout.
Steps to Reproduce :
Additional context (Add any other context about the problem here) :
This is a large course with 400+ students in it.
The text was updated successfully, but these errors were encountered: