Croway opened a new pull request, #26308:
URL: https://github.com/apache/camel/pull/26308

   QuickJS4J evaluates a module per invocation and QuickJS keeps evaluated 
modules until its context is freed, so a camel-quickjs engine grows by about 12 
KB of WebAssembly memory per evaluation. In an 8-thread load test with a 1 GB 
heap the heap went 496 → 939 MB in 20 s and the JVM died with 
`OutOfMemoryError` at 22 s, twice; the GC log shows 919 MB live after a full GC.
   
   A worker thread's engine is now closed and recreated once its linear memory 
exceeds `engineMaxMemory` (64 MB) or after `engineMaxEvaluations` (50,000) 
evaluations, both properties of `QuickjsLanguage`; the memory is observed 
through the Endive memory factory. With this the same 5-minute run completes at 
8,858 msg/s with no full GC and a stable heap. Docs and catalog mirror describe 
the engine lifecycle. Three new tests cover growth, recycling by count and by 
memory.
   
   Note: #CAMEL-24688 (camel API and precompiled scripts) carries the same 
recycling in its own form and will be rebased on this once merged.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   _Claude Code on behalf of Croway_
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to