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

feat: initially get votation data from websocket #188

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

edalholt
Copy link
Member

@edalholt edalholt commented Aug 21, 2023

Before all participants were notified when a new votation is started. Then they did a fetch for getting the votation data. Thus all participants are triggering a database read. Now this votation data is sent together with the update notification from the same database read. This makes the application feel faster and uses fewer resources.
The previous endpoint for fetching the votation is still used if the user refreshes the page.

No fectch (Unless reload) - DEMO:

Skjermopptak.2023-08-21.kl.22.46.41.mov

@edalholt edalholt self-assigned this Aug 21, 2023
@edalholt edalholt changed the title feat: initially get votation data from websocket for less database traffic feat: initially get votation data from websocket Aug 21, 2023
Copy link
Member

@eivindkopperud eivindkopperud left a comment

Choose a reason for hiding this comment

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

Looks like a neat feature! Haven't run, but the code LGTM 👌 Well done!

@edalholt edalholt merged commit 2c96d57 into dev Sep 6, 2023
9 checks passed
@edalholt edalholt deleted the feat/socket-send-votation branch September 6, 2023 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants