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

long page load times #13

Open
lsloan opened this issue May 8, 2023 · 11 comments
Open

long page load times #13

lsloan opened this issue May 8, 2023 · 11 comments

Comments

@lsloan
Copy link

lsloan commented May 8, 2023

UMich testers reported that in a course of several hundred students, which leads to over a thousand peer reviews, it takes a long time to load the app. It's comparable to the slowness of Canvas' own features.

Has Longhorn noticed this in testing, too? Admittedly, UMich is only using this app with our test instance of Canvas, which is a slower service than the production instance.

If the Canvas REST API is the limiting factor, maybe using their GQL API instead could help? I remember seeing that API was faster. I'm not sure whether Instructure is still promoting the use of that API, though.

@chrispittman
Copy link
Contributor

We're limited by the speed of the Canvas (no matter which API we use), and Canvas doesn't give a lot of horsepower to their test instances. We see this too, in all of our API-driven apps, and as you've noted it affects Canvas itself too. So there's a lower limit to how performant we can be.

Are pages timing out, or just being slow? Is there a particular set of pages that are worse than the others?

@lsloan
Copy link
Author

lsloan commented May 9, 2023

The pages are not timing out, but they are very slow to load. According to the developer tools in my browser, it took over 30 seconds for the page to load. The assignment we are testing with contains 1041 reviews from a course with 355 students. Some of our other courses that often use peer reviews regularly get over 1200 students, which would have approximately 3600 reviews.

Another peer review tool that we had been using at UMich is being retired and we hoped to replace it with this app from Longhorn Open. That other tool would reduce load times by using Canvas' course sections. A UMich professor, after reviewing your app suggested…

if the [Longhorn Open] team can integrate in a 'sections' selection in the tool, then this will be a huge step forward. Having to search for your students seems to be a big time drain in the process.
From a programming perspective, I'm not sure if this is feasible, or if this will speed up the process BUT logically, it seems to me that a gateway page where you select a section (EX: section 304) should speed up the loading process. This way it only needs to call up the 34 students in a section as opposed to the 340 students in the entire class.

Maybe that could be implemented by including a section selection on the same page where the assignment is selected. I'd imagine it would be a multiple-selection list (so more than one section could be chosen) and would include an option for "all sections" (useful for smaller courses).

Ideally, if a course has sections, when the table of reviews is shown, it would be nice to be able to select different section(s) directly on that page, without navigating back to the previous page.

@chrispittman
Copy link
Contributor

Would 'section' here be the section that the reviewer is in, or the section that the reviewee is in? Canvas does not enforce that those are the same section.

@chrispittman
Copy link
Contributor

Actually, Canvas's API lets you select all this by section, so I'm guessing they already have a sane default behavior figured out. I'll see if we can put in a section selector.

@chrispittman
Copy link
Contributor

Hmm. So Canvas's Peer Reviews API (https://canvas.instructure.com/doc/api/peer_reviews.html) allows you to ask for peer reviews by section, but it doesn't actually appear to limit it to just the reviews in that section. Both the /courses/{id} and /sections/{id} API endpoints on that page appear to give me the same results.

Are you seeing this behavior too?

@lsloan
Copy link
Author

lsloan commented May 9, 2023

Yes. I just checked the API. I first requested the reviews for a course/assignment ID combination. Then, choosing a section within the course, I requested the reviews for the section/assignment ID combination. The results for both requests are exactly the same in all regards.

Thanks for nothing, Instructure. 🙁

Looks like a bug in their API to me.

@chrispittman
Copy link
Contributor

Hmm. I've got a local branch open using Canvas's API for section reviews. Going to keep that on the shelf and do some background pondering until next week.

@lsloan
Copy link
Author

lsloan commented May 25, 2023

It might help to consider getting the peer grades and review comments for sections another way.

When only a section(s) of students is desired, then get a list of students in that section(s). For each student, get the peer grades and peer review comments they received for the assignment. This approach will require more API requests and may not be the most efficient, but if the section contains 30–50 students, Canvas will return the results much quicker than returning results for an entire course of 1500 students.

Of course, when the user wants the data for the entire course, then the current requests should be used.

chrispittman added a commit that referenced this issue May 26, 2023
@chrispittman
Copy link
Contributor

Possibly, yeah, but it's also possible that the overhead of establishing an extra 30-50 HTTP connections is significant. UT Austin generally uses peer review in small courses, so I don't have any large peer-review courses to test that out for myself.

I'd written up a version of this that uses either the /courses/ or /sections/ APIs to do this, which is when I discovered that Canvas treats both of those the same and I gave up on that approach. But it's also got the UI you'd need to allow users to pick a section, and to make backend choices based on that section selection. The work is in the peerreview-section-restriction branch, if you'd like to pick that up and flesh it out. I'd be happy to work through a pull request based on that!

@zqian
Copy link

zqian commented Aug 15, 2023

FYI, we have submitted a Canvas support ticket(Case # 09913533) and here is the msg from Instructure:

Our engineering team has confirmed that the API is working as intended as currently, there is no support for the user interface to have section-specific peer reviews. They also let is know that when UI is added for it in peer review enhancements, this endpoint will be updated as well.

I've asked the followup question for the /section peer review support. Waiting for the answers.

@chrispittman
Copy link
Contributor

Cool, thanks! We have a mostly-working branch that'd support it, and we're just waiting on Canvas's API to support it.

I'll listen for this endpoint support to be implemented, but if you hear about it before I do, please let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants