Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Poor Performance / Failure when Downloading Roster #2325

Open
bsiever opened this issue Aug 27, 2019 · 8 comments
Open

Poor Performance / Failure when Downloading Roster #2325

bsiever opened this issue Aug 27, 2019 · 8 comments

Comments

@bsiever
Copy link

bsiever commented Aug 27, 2019

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!

@stephaniegiang
Copy link
Contributor

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

@stephaniegiang
Copy link
Contributor

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 stephaniegiang moved this from Triage to In progress in GitHub Classroom Sep 4, 2019
@merliseclyde
Copy link

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.

@bsiever
Copy link
Author

bsiever commented Sep 8, 2019

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
Copy link
Author

bsiever commented Sep 10, 2019

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)`

@stephaniegiang stephaniegiang moved this from In progress to Triage in GitHub Classroom Sep 24, 2019
@adebali
Copy link

adebali commented Feb 2, 2020

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

@d12
Copy link
Contributor

d12 commented Feb 5, 2020

cc @andrewbredow

@bsiever
Copy link
Author

bsiever commented Feb 28, 2020

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
GitHub Classroom
  
Triage
Development

No branches or pull requests

5 participants