-
Notifications
You must be signed in to change notification settings - Fork 303
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
: Avoid unnecessary fetching of messages and posts
#7357
Development
: Avoid unnecessary fetching of messages and posts
#7357
Conversation
❌ Unable to deploy to test servers ❌Testserver "artemis-test5.artemis.cit.tum.de" is already in use by PR #7358. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on TS2.
- Writing messages/posts, reacting, editing, replying, and resolving messages worked as expected.
- GET /posts or GET /messages requests are only made for given situations
Development
: Eliminate unnecessary message retrievalDevelopment
: Avoid unnecessary fetching of messages and posts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on TS2. Works as expected 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Checklist
General
Client
Motivation and Context
When a client receives a new or updated Q&A post or conversation message via WebSocket, it currently fetches the last 50 messages, despite the WebSocket message providing all necessary information for appropriate client updates. Particularly when numerous users are online simultaneously, this approach generates a substantial number of unnecessary GET requests that the servers must process.
Description
Upon receiving a WebSocket message for an updated or created post/message, the client now updates the list of stored posts/messages accordingly without triggering an unnecessary REST request. The only exception is, when new Q&A posts are received. Adapting this use case would require to implement the server-side filtering in the client-side. However, since this use case is deprecated, it will not be changed in this PR.
Steps for Testing
Prerequisites:
In all other cases, neither the author nor another involved course member (2nd student) makes GET requests
Review Progress
Performance Review
Code Review
Manual Tests
Test Coverage
Client
Screenshots
No major UI changes (just a bugfix, because the post context filter was transparent):
before:
after: