On this page

Evaluation Cost Breakdown

Troubleshooting reference for Statsig evaluation scoring messages in the console, including diagnostics for SDK health and evaluation correctness.

The overall complexity of all rules in a gate determines feature gate evaluation speed. Each condition, operator, and value count contributes to a score that classifies rules and gates as Normal, Slow, or Very Slow. The gate complexity is the sum of the complexity of all its rules. A gate can be slow even without a single slow rule if the combined rules exceed the threshold. Use this page to identify the likely cause of a slow gate and the fastest way to fix it.

How to interpret "Slow" and "Very Slow"

These labels are relative tiers, not fixed millisecond thresholds. Actual runtime depends on device or server, network, and whether the SDK is using the worst-case scenario (for example, even if country is included in the user object, the SDK assumes IP geolocation is required). These labels are warnings. If you're already using the best practice for your context, you can ignore them.

Quick diagnosis

Cost drivers and fixes

Conditions

Statsig applies evaluation costs based on the condition type used in a gate. This table lists only conditions with a significant impact. Conditions not listed don't significantly impact SDK evaluation speed.

Tips:

  • If you target OS/Browser or their versions, pass explicit values on StatsigUser to avoid user-agent parsing. Server SDKs support os_name, os_version, browser_name, and browser_version; client SDKs use systemName, systemVersion, browserName, and browserVersion.
  • If you target Country, pass country directly to avoid IP-based lookup.

ID list size (overrides and ID based segments)

ID lists directly affect evaluation performance. This applies to both ID list overrides and segment conditions that reference ID lists.

Tips:

  • Trim stale IDs and scope lists to active cohorts.
  • Split large lists into smaller, purpose-built cohorts.

Operator

Statsig applies costs based on the operator used in a condition. Operators not listed don't significantly impact SDK evaluation speed.

Tips:

  • Match Regex String: Replace with ANY OF or precompute a boolean/enum attribute.
  • Version String: Precompute a normalized numeric value or major/minor fields and compare those instead.
  • Array Contains: Keep arrays short and consider flattening frequent checks into a single boolean attribute.

Value count

Statsig applies costs based on the number of values provided to a condition.

Tips:

  • If you're in the 50+ range, prune stale values or split cohorts.
  • Consider moving large lists into a smaller inline segment or a custom attribute computed upstream.

Was this helpful?