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

Development: Reduce for-dashboard payload significantly when participation results exist #6984

Merged
merged 2 commits into from
Jul 26, 2023

Conversation

krusche
Copy link
Member

@krusche krusche commented Jul 26, 2023

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) database calls.
  • I followed the coding and design guidelines.
  • I documented the Java code using JavaDoc style.

Client

  • Important: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data.
  • I followed the coding and design guidelines.

Motivation and Context

For each participation result, the for-dashboard REST call includes the whole data again, because of the chain "result -> participation -> exercise -> course -> exercises -> studentParticipations -> submissions -> results". In the worst case, this could result in a 80x larger payload in case a student participated in 80 course exercises.

Description

I created a new DTO because basically just 3 values are needed in the client: score, rated, participationId

Steps for Testing

  1. Open Artemis and navigate into the course statistics
  2. Double check there are not Typescript errors in the console related to the changes in this PR
  3. Make sure the statistics are still the same as before (when e.g. deploying develop)

Review Progress

Performance Review

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

@krusche krusche requested a review from a team as a code owner July 26, 2023 07:28
@krusche krusche added this to the 6.3.8 milestone Jul 26, 2023
@github-actions github-actions bot added tests server Pull requests that update Java code. (Added Automatically!) client Pull requests that update TypeScript code. (Added Automatically!) labels Jul 26, 2023
Copy link
Contributor

@jakubriegel jakubriegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM 👍🏻

Locally it works: no console errors, stats same as on develop

@github-actions
Copy link

❌ Unable to deploy to test servers ❌

The docker build needs to run through before deploying.

Copy link
Contributor

@Strohgelaender Strohgelaender left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Payload on TS1 is much smaller now:
grafik

grafik

@github-actions github-actions bot added the deployment-error Added by deployment workflows if an error occured label Jul 26, 2023
@terlan98 terlan98 added deploy:artemis-test5 and removed deployment-error Added by deployment workflows if an error occured labels Jul 26, 2023
@terlan98 terlan98 temporarily deployed to artemis-test5.artemis.cit.tum.de July 26, 2023 08:03 — with GitHub Actions Inactive
Copy link
Contributor

@terlan98 terlan98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on TS5. The course statistics page works as before 👍. There are no Typescript console errors related to this PR.

Code also LGTM.

Copy link
Contributor

@JohannesStoehr JohannesStoehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aprove code

Copy link
Contributor

@TimOrtel TimOrtel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me. This will most likely also require changes within our native clients.

@tobias-lippert tobias-lippert temporarily deployed to artemis-test5.artemis.cit.tum.de July 26, 2023 09:13 — with GitHub Actions Inactive
Copy link
Contributor

@tobias-lippert tobias-lippert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on ts5.
No typescript errors are shown in the console and statistics are correct.

@krusche krusche merged commit c416d59 into develop Jul 26, 2023
50 of 55 checks passed
@krusche krusche deleted the performance/reduce-dashboard-payload branch July 26, 2023 11:40
@maximiliansoelch
Copy link
Member

Code looks good to me. This will most likely also require changes within our native clients.

@terlan98 Do we need changes directly in Themis or only in the artemis-ios-core-modules?

@terlan98
Copy link
Contributor

Code looks good to me. This will most likely also require changes within our native clients.

@terlan98 Do we need changes directly in Themis or only in the artemis-ios-core-modules?

Themis is not affected by the changes on this PR. I'll just apply this change on ArtemisCore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Pull requests that update TypeScript code. (Added Automatically!) priority:high ready for review server Pull requests that update Java code. (Added Automatically!) tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants