Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: limit the scope of the template average build time query to the last 100#19648

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
cstyan merged 2 commits intomainfromcallum/template-build-time-query
Sep 1, 2025

Conversation

cstyan
Copy link
Contributor

This PR shouldresolvecoder/internal#719 by limiting theworkspace_builds rows selected by the query to the most recent 100 builds of a template, as opposed to all builds in the last 30d. For our own internal templates with the most builds (1700-2000 in a 30d period) this should cut the query execution time by about 80%.

Unless we have some restriction on keeping the 30d period, contract related or otherwise, this seems like a safe change to make. In addition to the execution speed improvements it also means the memory for the query is bounded as well.

If we want to keep a 30d time period for the avg build time value I think it's worth exploring a purpose built solution such as histogram structures where the build times could be bucketized by template ID as they're observed.

@github-actionsGitHub Actions
Copy link

github-actionsbot commentedAug 29, 2025
edited
Loading

All contributors have signed the CLA ✍️ ✅
Posted by theCLA Assistant Lite bot.

builds of a template as opposed to all builds in the last 30dSigned-off-by: Callum Styan <callumstyan@gmail.com>
@cstyancstyanforce-pushed thecallum/template-build-time-query branch from47305c3 tocd26f75CompareAugust 29, 2025 19:38
Signed-off-by: Callum Styan <callumstyan@gmail.com>
@cstyancstyan merged commit4fab14b intomainSep 1, 2025
44 of 48 checks passed
@cstyancstyan deleted the callum/template-build-time-query branchSeptember 1, 2025 16:31
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsSep 1, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@deansheatherdeansheatherdeansheather approved these changes

Assignees

@cstyancstyan

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

bug: GetTemplateAverageBuildTime creates lots of DB load
2 participants
@cstyan@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp