Closed dsevillamartin closed 1 year ago
New changes make the poll look like this. I know a 'max votes' option could probably be standalone without a switch for multiple votes, but that switch might be better UX? Unsure. I don't think it's a big concern regardless.
I've improved the performance of the new endpoint. These metrics are with the poll screenshoted above - two options. The # of selects goes up like 1 per additional option after this improvement, before it went up by 2 per option.
# OF QUERIES | Voting | Unvoting | Changing Vote |
---|---|---|---|
Before PR (legacy endpoint) | 21 | 19 | 24 |
Before optimization | 21 (~14 ms) | 19 (~12 ms) | 24 (~15 ms ) |
After optimization | 19 (~8 ms) | 17 (~6 ms) | 21 (~9 ms) |
This performance seems to be better than the legacy endpoint.
Fixes #3
Changes proposed in this pull request:
Reviewers should focus on:
increment
&decrement
(preferably moved to a queue as well, though then users would see the wrong count and polls with a few votes would look wrong). At least, only the options that were changed (added/removed) are refreshed.Screenshot
Confirmed
composer test
).