classroom icon indicating copy to clipboard operation
classroom copied to clipboard

Poor Performance / Failure when Downloading Roster

Open bsiever opened this issue 6 years ago • 8 comments

Downloading a roster has poor performance or "hangs" (leads to a 500 "Internal server error"). The class involved is relatively large, ~620-640 students, and we've uploaded a roster. Paging through the roster is also very very slow.

It worked relatively well before many students had joined the class. I'm guessing that it's forcing a LOT of work to take place client side (CPU utilization spikes!) and/or it's doing some sort of nested looping over IDs.

To Reproduce

  1. Add a roster for ~600 students.
  2. Have ~600 people create repos.
  3. Go to the roster page
  4. Click "Download" and wait...(the browser CPU utilization skyrockets)

Expected behavior We expect a .csv file to be downloaded (it had worked, although slowly before students had created repos).

Screenshots Nothing of significance.

Additional context Large class / Large roster.

Thanks for any assistance!

bsiever avatar Aug 27 '19 23:08 bsiever

Hi 👋 @bsiever! I'll take a look into this 😄

stephaniegiang avatar Aug 28 '19 18:08 stephaniegiang

Roster entries is currently one of Classroom's slowest page due to the API requests we are making to GitHub. For each roster entry, we currently make an API request to grab information such as GitHub profile user.

We will work on improving this 😄 and update this issue when progress has been made.

stephaniegiang avatar Aug 28 '19 19:08 stephaniegiang

I am having a similar problem creating a roster imported from Sakai. I have configured Sakai for another class and encountered the 500 internal server error message several times (but figured that it might have been a configuration problem on Sakai). Eventually the roster loaded. Repeating steps for another class (STA721) and encountering the same issue, but have not been successful in getting the roster to load. Class is under 30 students. Let me know if there is anything on the LMS side that could help with configuration or if this is purely an in issue on the GitHub classroom side.

merliseclyde avatar Sep 05 '19 13:09 merliseclyde

At the moment download always times out. Is there any alternative to get the roster other than manually grabbing each page and doing a little processing?

bsiever avatar Sep 08 '19 17:09 bsiever

Update: This is a horrible, inelegant hack ...but at the moment I'm running some JavaScript to get the entire roster. (I'm not sure why advancing to the next page pegs my CPU at 100%, but it does. If this were all web requests I'd expect the delay in async-waiting.... I'm guessing there's some weird looping or polling going on)

Anyway, if anyone else needs it...Right click on the page, Inspect (Chrome), select the JavaScript Console tab, paste this in, and wait for it to roll through the entire roll (eventually):

var current = ""

function dumpCurrentPage() {
    $('.flex-column').each(
        (i,e) => {
            var name = $(e).find('.assignment-name-link').html()
            if(name) {
                name = name.trim()        
                var gitHubId = $(e).find('p a').html()
                if(gitHubId) {
                    gitHubId = gitHubId.trim().slice(1)
                } else {
                    gitHubId = ""
                }
                console.log(`${name},${gitHubId}`)
            }
        }
    )    
}

function checkChange() {
    // If a new page
    if(current!=window.location.href ) {
        // Dump it.
        dumpCurrentPage()
        // Update the current page
        current = window.location.href
        // Get the next page. 
        $('.next')[0].click()
    }
}

setInterval(checkChange, 1000)`

bsiever avatar Sep 10 '19 12:09 bsiever

I am having a similar problem creating a roster imported from Sakai. I have configured Sakai for another class and encountered the 500 internal server error message several times (but figured that it might have been a configuration problem on Sakai). Eventually the roster loaded. Repeating steps for another class (STA721) and encountering the same issue, but have not been successful in getting the roster to load. Class is under 30 students. Let me know if there is anything on the LMS side that could help with configuration or if this is purely an in issue on the GitHub classroom side.

I also get the 500 internal server error message. I checked the configuration on Sakai, but I cannot figure out how to retrieve the roster. Could you tell me your solution? @merliseclyde

adebali avatar Feb 02 '20 08:02 adebali

cc @andrewbredow

d12 avatar Feb 05 '20 04:02 d12

For what it's worth, when I go to the roster page and open the Inspector I'm seeing messages like:

[DOM] Found 3217 elements with non-unique id #roster_entry_id: (More info: ...)

It seems like this should be an easy fix. (The performance issues are still there though)

For a little more context: This is a large-ish class (~530 on the roster) and I'm using Chrome.

bsiever avatar Feb 28 '20 19:02 bsiever