odoo icon indicating copy to clipboard operation
odoo copied to clipboard

[FW][FIX] point_of_sale: optimize addItem for faster record linking

Open fw-bot opened this issue 1 year ago • 2 comments

Prior to this commit, the addItem function had a time complexity of O(n), which resulted in lengthy data load times when dealing with numerous records. This commit optimizes the function by utilizing a set, thereby reducing the time complexity to O(1) and significantly improving performance.

opw-3923668


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: odoo/odoo#165570 Forward-Port-Of: odoo/odoo#165451

fw-bot avatar May 16 '24 19:05 fw-bot

Pull request status dashboard.

robodoo avatar May 16 '24 19:05 robodoo

@pedrambiria @caburj cherrypicking of pull request odoo/odoo#165451 failed.

stdout:

Auto-merging addons/point_of_sale/static/src/app/models/related_models.js
CONFLICT (content): Merge conflict in addons/point_of_sale/static/src/app/models/related_models.js

stderr:

21:01:12.548535 git.c:463               trace: built-in: git cherry-pick 3f95dd446e6635dd013751a4c1c6fc86c04fcb94
error: could not apply 3f95dd446e66... [FIX] point_of_sale: optimize addItem for faster record linking
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
----------
status:

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

In the former case, you may want to edit this PR message as well.

:warning: after resolving this conflict, you will need to merge it via @robodoo.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

fw-bot avatar May 16 '24 19:05 fw-bot

robodoo r+

pedrambiria avatar May 28 '24 13:05 pedrambiria