Skip to content

fix(ClassroomMonitor): Download a step's student data once when it opens - #2364

Open
Isaries wants to merge 1 commit into
WISE-Community:developfrom
Isaries:fix/share-step-data-request
Open

Isaries wants to merge 1 commit into
WISE-Community:developfrom
Isaries:fix/share-step-data-request

Conversation

@Isaries

@Isaries Isaries commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Opening a step in Grade by Step makes both the response list and the question summaries call retrieveStudentDataForNode for the same node, so the step's work was downloaded twice in parallel. The response holds every revision of every team's work; for a concept map step in a class of 125 teams it was 57 MB, and the two parallel downloads took over three minutes, during which the list stayed empty.

Concurrent requests with identical parameters now share one download. A call made after the first request has finished or failed requests again, so nothing is cached beyond the request in flight. Both callers ignore the emitted value and read the data from the service, which now processes the response once instead of twice.

Testing: new teacherDataService.spec.ts with four tests. The sharing test fails on develop; the other three (different nodes, a later call, a call after a failure) guard against caching too much and were checked against deliberately broken variants. Full suite: 2503 pass, with one failure that also fails on develop.

Opening a step in Grade by Step makes both the response list and the
question summary call retrieveStudentDataForNode for the same node, so every
revision of the step's work was downloaded twice in parallel. The list stays
empty until the download ends, and for steps with a lot of work that response
is large.

Concurrent requests with identical parameters now share one download. A call
made after the first request has finished or failed requests again, so
nothing is cached beyond the request in flight.
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

Successfully merging this pull request may close these issues.

1 participant