Commit a46bf5a
committed
perf(tags): short-circuit flush_for_product when inheritance is disabled
`tag_inheritance.flush_for_product` is called unconditionally from the
importer's `process_scan` (and reimporter equivalent). When tag
inheritance is disabled (neither the system-wide flag nor the per-product
flag is set) the previous implementation still walked every child
queryset to compute the (empty) diff, adding ~9 queries per scan.
Tests in `unittests/test_importers_performance.py` pin importer query
counts in scenarios where inheritance is off. The Stage 2 commit's
flush call shifted those baselines up by 9 across 10 test cases. Add an
early-exit so the importer perf tests stay green and no behavior change
ships under the inheritance-off configuration.1 parent e4193ae commit a46bf5a
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
70 | 74 | | |
71 | | - | |
| 75 | + | |
72 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
73 | 80 | | |
0 commit comments