Skip to content

feat(node-sdk): use optimized flag evaluation#442

Merged
roncohen merged 9 commits intomainfrom
any-of-performance
Jun 27, 2025
Merged

feat(node-sdk): use optimized flag evaluation#442
roncohen merged 9 commits intomainfrom
any-of-performance

Conversation

@roncohen
Copy link
Contributor

Use the new facility from the flag-evaluation package to ensure low CPU even with huge lists of targets.

@roncohen roncohen requested review from Copilot and pavkam June 26, 2025 08:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR integrates the new optimized flag evaluation facility from the flag-evaluation package to improve CPU efficiency when handling large target lists. Key changes include:

  • Removing evaluateFeatureRules mocks and expectations in the test suite.
  • Adding a new CachedFeatureDefinition type and integrating newEvaluator in types and client modules.
  • Updating client logic to use newEvaluator for both enabled and config evaluations.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/node-sdk/test/client.test.ts Removed redundant evaluateFeatureRules mocks and adjusted test expectations.
packages/node-sdk/src/types.ts Introduced CachedFeatureDefinition and imported newEvaluator to support evaluations.
packages/node-sdk/src/client.ts Updated feature evaluation flow to compute evaluation results using newEvaluator and adjusted cache type accordingly.

@roncohen roncohen changed the title feat: use optimized flag evaluation feat(node-sdk): use optimized flag evaluation Jun 26, 2025
@roncohen roncohen enabled auto-merge June 26, 2025 09:21
@roncohen roncohen added this pull request to the merge queue Jun 27, 2025
Merged via the queue into main with commit 2c3074f Jun 27, 2025
6 checks passed
@roncohen roncohen deleted the any-of-performance branch June 27, 2025 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants