Skip to content

perf: use batches to decrease the number of concurrent db connections, use singleflight for more db queries, use subject filter where possible, use per-request concurrency limit - #3023

Open
maxmanuylov wants to merge 13 commits into
Permify:masterfrom
JetBrains:fix-concurrency

fix: review fixes

8f47504
Select commit
Loading
Failed to load commit list.
Codecov / codecov/project succeeded Aug 4, 2026 in 0s

75.64% (target 75.00%)

View this Pull Request on Codecov

75.64% (target 75.00%)

Details

Codecov Report

❌ Patch coverage is 71.77590% with 267 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.64%. Comparing base (f683703) to head (8f47504).

Files with missing lines Patch % Lines
internal/engines/check.go 80.05% 72 Missing and 10 partials ⚠️
internal/servers/permission_server.go 20.55% 58 Missing ⚠️
...ternal/storage/proxies/singleflight/data_reader.go 73.74% 26 Missing ⚠️
internal/engines/bulk.go 79.00% 16 Missing and 9 partials ⚠️
internal/storage/postgres/utils/filter.go 0.00% 18 Missing ⚠️
internal/engines/entity_filter.go 81.34% 7 Missing and 7 partials ⚠️
internal/storage/memory/data_reader.go 26.67% 9 Missing and 2 partials ⚠️
internal/engines/lookup.go 76.32% 6 Missing and 3 partials ⚠️
internal/engines/utils.go 0.00% 6 Missing ⚠️
pkg/balancer/builder.go 45.46% 6 Missing ⚠️
... and 5 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3023      +/-   ##
==========================================
- Coverage   76.26%   75.64%   -0.61%     
==========================================
  Files          83       83              
  Lines        9215     9712     +497     
==========================================
+ Hits         7027     7346     +319     
- Misses       1638     1797     +159     
- Partials      550      569      +19     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.