-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Improve evaluation performance #1453
Comments
I'd like to work on this one @beeme1mr ! Could you please assign it to me? |
@beeme1mr To confirm, should this change be made in the repository at https://github.com/diegoholiveira/jsonlogic? |
No, what @beeme1mr was getting at is that we parse and compile the JSON rules every time we evaluate (here). We can instead only do this when the rules are first retrieved. @beeme1mr please correct if I'm wrong Assigning you, @aasifkhan7 |
@aasifkhan7 is correct that the JSON Logic implementation in Go must be updated to support this feature first. Once that's in place, we need to update flagd to leverage it. |
@beeme1mr @toddbaert Should it be the responsibility of the What are your thoughts on the best approach for handling this? |
Hey @aasifkhan7, I propose that the JSON Logic library support a built step similar to what you see here. This would allow you to "hydrate" the JSON Logic engine during initiation instead of at evaluation time. |
Hey @beeme1mr, based on this comment, it seems we’re expected to handle caching of all predecoded rules on our side. Does that approach work for you? |
@aasifkhan7 sure, let's give it a shot. |
Overview
The flag evaluation engine in flagd leverages JsonLogic to provide a powerful and flexible rule-based serializable logic. The flagd binary and in-process Go flagd provider use this library. To improve flag evaluation performance and reduce computational overhead, the ruleset should be pre-decoded when a flag set is loaded (or updated). This removes the need to parse the JsonLogic structure for each evaluation.
Tasks
The text was updated successfully, but these errors were encountered: