github-education-resources / classroom

GitHub Classroom automates repository creation and access control, making it easy for teachers to distribute starter code and collect assignments on GitHub.
https://classroom.github.com
1.34k stars 565 forks source link

Paginate Google Classroom request #2311

Open stephaniegiang opened 5 years ago

stephaniegiang commented 5 years ago

Currently, we do not paginate the api request for grabbing students. We should think about paginating the response so that the request is not slow for classrooms that are large.

https://github.com/education/classroom/blob/b5d4cab8cfdb4556b6d3e277522769ea10e5c5d9/app/controllers/orgs/rosters_controller/google_classroom_dependency.rb#L58

API docs for Google Classroom

spinecone commented 5 years ago

If there isn't a risk of the request timing out, we might want to consider just moving this request to a background job instead of paginating it (so far I haven't seen any references to timeouts in the google classroom API docs but will keep looking).