Skip to content

[Performance] Trie index cache when one input is data reference  #6363

Open
@prasanthj

Description

@prasanthj

Short description

any_prefix_match and any_suffix_match builtin constructs a trie index internally every time the builtin is invoked. If the input is a reference to data there is possibility of caching the trie index until the data changes.

When the data is around 80k paths, the p99 latency reported by opa bench is ~200ms of which about ~150ms is added by #5946 as per the slack discussion below.

Expected behavior

Reuse trie index when data does not change for the any_prefix_match and any_suffix_match builtin

Additional context

https://openpolicyagent.slack.com/archives/CBR63TK2A/p1698428765461689 thread has additional context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions