Andrea Cosentino created CAMEL-26839:
----------------------------------------

             Summary: camel-opa - benchmark static WASM data preparation on 
every borrow
                 Key: CAMEL-26839
                 URL: https://issues.apache.org/jira/browse/CAMEL-26839
             Project: Camel
          Issue Type: Task
            Reporter: Andrea Cosentino
            Assignee: Andrea Cosentino


h2. Problem / motivation
OpaWasmEvaluator reapplies entrypoint and static data on each pool borrow. This 
may incur repeated work for large data documents, but the current design 
deliberately resets state defensively.

h2. Proposed scope
Benchmark realistic data sizes and concurrent workloads. Inspect the managed 
SDK heap/reset contract, and prepare immutable data/entrypoint once per 
instance only if correctness and measurable benefit justify it. Preserve 
discard-on-trap behavior and explain any change to the existing rationale.

h2. Acceptance criteria / validation
* Record baseline and proposed allocation/throughput results.
* Verify no cross-request input/data state leakage across reuse and failures.
* Validate replacement instances after traps.
* If optimization is not justified, retain the current behavior and document 
the evidence.

h2. References
* 
https://github.com/apache/camel/blob/5686684cb418/components/camel-opa/src/main/java/org/apache/camel/component/opa/OpaWasmEvaluator.java#L78
* 
https://github.com/apache/camel/blob/5686684cb418/components/camel-opa/src/main/java/org/apache/camel/component/opa/OpaWasmPolicyPool.java#L125

Source: read-only component audit at 5686684cb418. Recheck current main before 
implementing; historical references identify the audited code.

_AI-generated by Codex on behalf of oscerd (JIRA: acosentino)._



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to