mdproctor opened a new issue, #6717: URL: https://github.com/apache/incubator-kie-drools/issues/6717
## Summary Two related scaling issues in the beta memory layer: **1. `JoinMemory.removeLeft/removeRight()` uses `ArrayList.remove(Object)`** — O(n) linear scan + shift for every retraction. With large join memories this makes retraction O(n) in memory size. **2. `JoinRightBetaProcessor.findRight()`** — O(n) linear scan of the right-handles list on every update/remove to find the stored `ObjectHandleTuple` by handle identity. ## Fix approach - Replace `ArrayList` with `TupleMemory` (linked-list-based, O(1) remove by pointer) as used in vol1. - Add a back-pointer from `ObjectHandleImpl` to its stored `ObjectHandleTuple` to eliminate the `findRight` scan, or maintain an `IdentityHashMap<ObjectHandleImpl, ObjectHandleTuple>` on the right side. Refs #6712 -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
