opsmill / infrahub

Infrahub - A new approach to Infrastructure Management
https://opsmill.com/
GNU Affero General Public License v3.0
192 stars 10 forks source link

fix(backend): various perf optimizations #3753

Closed fatih-acar closed 2 months ago

fatih-acar commented 3 months ago

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
              }
            }
          }
        }
      }
    }
  }
}
codspeed-hq[bot] commented 3 months ago

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%