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): various perf optimizations #3753

Merged
merged 2 commits into from
Jul 8, 2024
Merged

Conversation

fatih-acar
Copy link
Contributor

@fatih-acar fatih-acar commented Jul 2, 2024

This should improve read paths when using the following query against the demo data
We should actually run this kind of query during the CI benchmark step but that requires loading the demo data...

query {
  InfraDevice {
    edges {
      node {
        name {
          value
        }
        interfaces {
          edges {
            node {
              name {
                value
              }
            }
          }
        }
      }
    }
  }
}

@fatih-acar fatih-acar added the ci/skip-changelog Don't include this PR in the changelog label Jul 2, 2024
@github-actions github-actions bot added the group/backend Issue related to the backend (API Server, Git Agent) label Jul 2, 2024
Copy link

codspeed-hq bot commented Jul 2, 2024

CodSpeed Performance Report

Merging #3753 will improve performances by 49.88%

Comparing fac-some-perf-optim (6cb7a00) with develop (01fd714)

Summary

⚡ 1 improvements
✅ 9 untouched benchmarks

Benchmarks breakdown

Benchmark develop fac-some-perf-optim Change
test_load_node_to_db_node_schema 74.7 ms 49.8 ms +49.88%

@fatih-acar fatih-acar force-pushed the fac-some-perf-optim branch 4 times, most recently from 700f5b3 to 55336d3 Compare July 2, 2024 22:06
@fatih-acar fatih-acar changed the title fix(backend, core): test perf fix(backend): various perf optimizations Jul 2, 2024
Creating a new enum in loop seems to be cpu intensive.
Cache the enum class on first usage to avoid that.

Signed-off-by: Fatih Acar <[email protected]>
@fatih-acar fatih-acar marked this pull request as ready for review July 5, 2024 09:15
This will avoid filesystem and socket syscalls at each init.

Signed-off-by: Fatih Acar <[email protected]>
@fatih-acar fatih-acar merged commit 52c0cc5 into develop Jul 8, 2024
45 checks passed
@fatih-acar fatih-acar deleted the fac-some-perf-optim branch July 8, 2024 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/skip-changelog Don't include this PR in the changelog 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