Skip to content
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

TODO: Cart items refreshing for every value change #10379

Closed
sebastianfdez opened this issue Dec 11, 2020 · 9 comments · Fixed by #10865
Closed

TODO: Cart items refreshing for every value change #10379

sebastianfdez opened this issue Dec 11, 2020 · 9 comments · Fixed by #10865

Comments

@sebastianfdez
Copy link

Hi everyone.

Is this TODO planned to be solved soon ? We are facing some terrible performance issues within 100+ products baskets. The initial rendering is quite OK, but then, everytime we change a QTY, all the lines are re-renderer so the interaction is very slow.

@Input('items')
// TODO: currently we're getting a new array of items if the cart changes.
// pretty annoying as it forces a repaint on the screen,
// which is noticable in the UI.
set items(items: OrderEntry[]) {
this.resolveItems(items);
this.createForm();
}

Thanks a lot !

@Xymmer Xymmer added the bug Something isn't working label Dec 14, 2020
@Xymmer Xymmer modified the milestones: 3.1, 3.2 Dec 15, 2020
@Xymmer Xymmer added this to Backlog/Stretch/Hold in Spartacus Bug Board [can close board?] Dec 15, 2020
@Xymmer Xymmer moved this from Backlog/Stretch/Hold to To Do in Spartacus Bug Board [can close board?] Dec 15, 2020
@Xymmer Xymmer modified the milestones: 3.2, 3.x Dec 16, 2020
@Xymmer Xymmer moved this from To Do: Soon to To Do: URGENT in Spartacus Bug Board [can close board?] Dec 16, 2020
@Xymmer Xymmer moved this from To Do: URGENT to To Do: Next in Spartacus Bug Board [can close board?] Dec 16, 2020
@ren-tham ren-tham self-assigned this Dec 21, 2020
@ren-tham ren-tham moved this from To Do: Next to In Progress in Spartacus Bug Board [can close board?] Dec 21, 2020
@Parthlakhani
Copy link
Contributor

Tried reproducing the bug with 180 products in the cart, could not reproduce.

@Parthlakhani Parthlakhani moved this from In Progress to To Do: Next in Spartacus Bug Board [can close board?] Dec 31, 2020
@Parthlakhani Parthlakhani removed their assignment Dec 31, 2020
@Zeyber Zeyber self-assigned this Jan 20, 2021
@Zeyber Zeyber moved this from To Do: Next to In Progress in Spartacus Bug Board [can close board?] Jan 21, 2021
@Zeyber Zeyber moved this from In Progress to Code Review & Local QA in Spartacus Bug Board [can close board?] Jan 25, 2021
@Zeyber Zeyber removed their assignment Jan 25, 2021
@Zeyber Zeyber self-assigned this Feb 1, 2021
@hackergil
Copy link
Contributor

hackergil commented Mar 20, 2021

Current solution does not work properly

  • It caused a bug where the last product is duplicated with a quantity of 0
  • On cart-item-list.component, we cannot modify cart item list this._items in version > 3.0 since we've activated strict mode and it freezes arrays and properties.

@hackergil hackergil reopened this Mar 20, 2021
Spartacus Bug Board [can close board?] automation moved this from QA from Server Post-Merge to Newly Added Mar 20, 2021
@hackergil hackergil moved this from Newly Added to Backlog in Spartacus Bug Board [can close board?] Mar 20, 2021
@hackergil hackergil moved this from Backlog to To Do: Next in Spartacus Bug Board [can close board?] Mar 24, 2021
hackergil added a commit that referenced this issue Mar 24, 2021
# Conflicts:
#	projects/storefrontapp/src/app/app.module.ts
#	projects/storefrontlib/src/cms-components/cart/cart-shared/cart-item-list/cart-item-list.component.ts
@Xymmer Xymmer moved this from To Do: Next to To Do: URGENT in Spartacus Bug Board [can close board?] Apr 14, 2021
@Xymmer Xymmer added the esc label Apr 14, 2021
@Zeyber Zeyber moved this from To Do: URGENT to In Progress in Spartacus Bug Board [can close board?] Apr 14, 2021
@Zeyber
Copy link
Contributor

Zeyber commented Apr 16, 2021

It doesn't look like all cart items are rendering on QTY change anymore. Only the item with the updated QTY which is what's desired.

image

@Zeyber Zeyber closed this as completed Apr 16, 2021
@Zeyber Zeyber moved this from In Progress to Merge in Spartacus Bug Board [can close board?] Apr 16, 2021
@Zeyber Zeyber moved this from Merge to QA from Server Post-Merge in Spartacus Bug Board [can close board?] Apr 16, 2021
@Zeyber Zeyber removed their assignment Apr 16, 2021
@giancorderoortiz giancorderoortiz self-assigned this May 17, 2021
@giancorderoortiz
Copy link
Contributor

@sebastianfdez could you please share with us the average, max, mean cart size in your project? It would help us for testing purposes.

@giancorderoortiz
Copy link
Contributor

This issue "appears" to be fixed.
I recreated a cart with 100+ items in it.
Upon changing quantities, I do see a delay of less than 5 seconds. The delay is random, but it's there.
Attaching some screen shots and video-recordings.
However, I do not see terrible performance as initially described in this ticket. ✅

It's necessary to have concrete performance specs and expectations regarding large carts so we can reproduce internally.

@giancorderoortiz
Copy link
Contributor

dev_branch_may_17_2021_large_cart.mov

@giancorderoortiz
Copy link
Contributor

qa_server_100_plus_cart.mov

@giancorderoortiz
Copy link
Contributor

@giancorderoortiz
Copy link
Contributor

Screen Shot 2021-05-18 at 6 20 30 AM

Screen Shot 2021-05-18 at 6 24 47 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

8 participants