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

internal/goreviews: scale dashboard loading #44

Open
zpavlinovic opened this issue Oct 22, 2024 · 0 comments
Open

internal/goreviews: scale dashboard loading #44

zpavlinovic opened this issue Oct 22, 2024 · 0 comments
Assignees

Comments

@zpavlinovic
Copy link
Contributor

zpavlinovic commented Oct 22, 2024

It currently takes a significant chunk of time to load the attention dashboard. With every request, we would redo all of the work: load all changes, score them, and present them. Instead, we should do it incrementally.

One way to do this is as follows. We have a separate watcher that tracks updates to changes. We also have a db where we keep metadata on non-rejected changes with their scores. For each new change update, we see if the change should be rejected. If so, we just remove it from the db. If it is a non-rejected change, we re-score it. We then present only non-rejected changes only.

Updating the db and rendering the dashboard can be done within a single handler, or we can keep them separate. This algorithm will take some time the first time we run it, but afterwards it should run pretty fast.

@ianlancetaylor

@zpavlinovic zpavlinovic self-assigned this Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant