ossinsight
ossinsight copied to clipboard
Reduce the number of connection requests
Description
On the current website, each metric number needs to initiate a database query. When the user browses a page, it may send 10~20 query requests to the database.
Tasks
- [ ] 1. Combine some small query (#678, #685)
For example, the above screenshot needs to send 4 requests (/q/pull-requests-total
、/q/pull-request-creators-total
、/q/pull-request-reviews-total
、/q/pull-request-reviewers-total
), we can combine these queries into one, like /q/pull-request-summary
.
![image](https://user-images.githubusercontent.com/5086433/180122588-32341bf2-9d04-410a-ad45-90710504783b.png)
- [ ] 2. Use WebSocket to push
events-total-increment
The current web page needs to obtain real-time event data through the poll, WebSocket will be a better way to achieve it.