-
-
Notifications
You must be signed in to change notification settings - Fork 725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimise Shipment#to_package #6466
Optimise Shipment#to_package #6466
Conversation
This is done in a later Spree commit to reduce the amount of processing done in larger orders. See: spree/spree@ab01b1e
@Matt-Yorkley would you mind checking if that's automated already? |
I've got this one @sauloperez 👍 Thanks for bringing this up! |
I think there are various specs that already cover this in different ways, I just thought a quick sanity-check might be a good idea just to make extra sure. It's a fairly simple change, but the |
Hey @Matt-Yorkley , I've made a brief sanity check here:
Met pre-existing issues: #6300 and #2881 Also met this UI-related: #6707 There are plenty of scenarios covered on the spec Anyway, I think this PR is good to go. |
Cool. I think at the point you switched in the backoffice, the rates have already been calculated, so it won't be faster at that specific point. |
What? Why?
This performance improvement is added in a Spree 2.2 commit to reduce the amount of processing done in larger orders. Spotted when looking at adjustments changes in
2-2-stable
.See: spree/spree@ab01b1e for details.
What should we test?
The
#to_package
method is used when checking different shipping rates for an order, and when calculating some adjustments. Maybe sanity check switching shipping methods at checkout and placing an order (with lots of items in the order, not just one)?Release notes
Changelog Category: Technical changes
Backported a performance improvement for Shipment#to_package