Performance regression: v5 is 2–7× slower than v3.8.0 for local evaluation
@khvn26 đang làm issue này rồi.
Từ ngày 28/4/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Benchmarked flagsmith 5.0.1 vs 3.8.0 against the same environment (edge API, enable_local_evaluation=True, 262 features, single-threaded, after 200-iter warmup).
p50 per call
| Operation | v3.8.0 | v5.0.1 | Regression |
|---|---|---|---|
get_identity_flags |
0.39 ms | 0.82 ms | 2.1× |
get_environment_flags |
0.11 ms | 0.79 ms | 7.4× |
is_feature_enabled (cached Flags) |
0.08 µs | 0.08 µs | — |
Throughput drops from ~2,570 → ~1,215 identity evals/sec per core. Latency variance also grew (stdev ~10 µs → ~220 µs).
Repro
from time import perf_counter
from flagsmith import Flagsmith
client = Flagsmith(
environment_key="<server-side-key>",
api_url="https://edge.api.flagsmith.com/api/v1/",
enable_local_evaluation=True,
environment_refresh_interval_seconds=3600,
)
client.update_environment()
# warmup
for _ in range(200):
client.get_identity_flags(identifier="anonymous", traits={"venue_id": "12345"})
for n in (100, 1_000, 10_000):
t0 = perf_counter()
for _ in range(n):
client.get_identity_flags(identifier="anonymous", traits={"venue_id": "12345"})
elapsed = perf_counter() - t0
print(f"{n:>6} iters: {elapsed*1000:8.1f} ms ({elapsed/n*1e6:7.2f} µs/call)")
Environment: flag-engine 10.0.1, Python 3.12, macOS.
- Ngôn ngữ chính
- Python
- Star
- 24
- Fork
- 12
- Merge trung bình
- 15 giờ 43 phút
- Pull request đã merge (30 ngày)
- 4
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Flagsmith/flagsmith-python-client
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
-
Dependency Dashboard Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
Tất cả issue của Flagsmith/flagsmith-python-client
Issue tương tự
-
documentation help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
simonw/sqlite-utils#872 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100