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

fix(backend): startup optimizations #5401

Merged
merged 2 commits into from
Jan 9, 2025
Merged

fix(backend): startup optimizations #5401

merged 2 commits into from
Jan 9, 2025

Conversation

fatih-acar
Copy link
Contributor

@fatih-acar fatih-acar commented Jan 8, 2025

This PR adds a ~50% speed improvement on the "regular" startup of Infrahub (no first time initialization/bootstrap).

Not really sure how to tackle the pagination issue described in e3877a7

We can avoid an extra generate_object_types() call by running
get_gql_query() earlier.

Signed-off-by: Fatih Acar <fatih@opsmill.com>
@github-actions github-actions bot added the group/backend Issue related to the backend (API Server, Git Agent) label Jan 8, 2025
There is a few microseconds overhead for this function...
Also add a span for Query.execute in order to know the overhead of
fetching the results.

Signed-off-by: Fatih Acar <fatih@opsmill.com>
Copy link

codspeed-hq bot commented Jan 8, 2025

CodSpeed Performance Report

Merging #5401 will improve performances by 36.04%

Comparing fac-faster-startup (6a4838e) with stable (929df94)

Summary

⚡ 2 improvements
✅ 8 untouched benchmarks

Benchmarks breakdown

Benchmark stable fac-faster-startup Change
test_graphql_generate_schema 366.4 ms 296.9 ms +23.41%
test_schemabranch_duplicate 443.6 µs 326.1 µs +36.04%

@fatih-acar fatih-acar merged commit a07bb7f into stable Jan 9, 2025
33 checks passed
@fatih-acar fatih-acar deleted the fac-faster-startup branch January 9, 2025 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group/backend Issue related to the backend (API Server, Git Agent)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants