Skip to content

Related to ISSUE-53347: Removed call to session.clear to avoid undesirable side effects

Agustí Gállego requested to merge openbravo/devel/openbravo:fix/53347 into master

The call to Session.clear() caused some lazy initialization errors in downstream code. This MR removes the Session.clear() call and adds logic to evict objects form the Session to improve performance in imports with many lines.

Performance with 3300 items With session.clear: 48 seconds in new inventory counts. 39s in already created inventory counts. Without session.clear and all evictions: 26.5 seconds in new inventory counts. 17 s in already created inventory counts. Without session.clear and no evictions: 790 seconds in new inventory counts.

Related MR: https://gitlab.com/openbravo/customers/SMCP/com.openbravo.smcp.warehouse/-/merge_requests/31

BUILD: https://builds.openbravo.com/job/try-init/2642/console

Edited by Agustí Gállego

Merge request reports