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

Remove num_watches column from table repository #32557

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

lunny
Copy link
Member

@lunny lunny commented Nov 19, 2024

To keep consistent, a cron job will run in the background to check num_watches. For a big instance, it will become very slow. So I think we can remove the column and query the table when necessary.

@lunny lunny added the type/enhancement An improvement of existing functionality label Nov 19, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 19, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 19, 2024
@lunny lunny added this to the 1.23.0 milestone Nov 19, 2024
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code modifies/migrations labels Nov 19, 2024
@delvh
Copy link
Member

delvh commented Nov 19, 2024

and query the table when necessary

Erm… isn't that
grafik?

If yes, this won't be a performance improvement.
It will instead worsen the performance.

@lunny
Copy link
Member Author

lunny commented Nov 21, 2024

and query the table when necessary

Erm… isn't that grafik?

If yes, this won't be a performance improvement. It will instead worsen the performance.

Yes, but it's a slight additional load. It commonly will only increase by about 1ms for this page. We can also optimize it with cache in future PRs. Why I couldn't do it because introducing cache in this place needs more refactors PR merged first such as #32506 and #32537

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code modifies/migrations size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants