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

[3.x]: adding items to cart gets slower the more items are in the cart. #3207

Closed
hhentschel opened this issue Jun 30, 2023 · 6 comments
Closed
Assignees
Labels
bug commerce3 Issues related to Commerce v3

Comments

@hhentschel
Copy link

What happened?

Description

Adding items to cart gets slower the more items are being added.

Around the first 5 items the loading time stays about the same, but then it gets slower and slower.
Especially after 10 items in the cart it is noticeable slower, by then it takes ~10s to add a product to the cart.
Using sprig to add items to the cart, but this should'nt have any affect.

There are ~50 discounts in the store.

Similar to issue here

Sending db dumb and composer.json and composer.lock file to support@craftcm.com
with link to this issue.

Craft CMS version

3.8.13

Craft Commerce version

3.4.21

PHP version

7.4.21

Operating system and version

Darwin 22.3.0

Database type and version

MySQL 5.7.34

Image driver and version

Imagick 3.4.4 (ImageMagick 6.9.6-2)

Installed plugins and versions

Back In Stock | 1.4.4
Blitz | 3.12.9
Blitz Recommendations | 1.3.0
Campaign | 1.24.1
Contact Form | 2.5.2
CP Field Inspect | 1.4.4
Datatrans for Craft Commerce | 1.0.0
Express Forms | 1.1.4
Feed Me | 4.6.3.1
Neo | 2.13.18
Redactor | 2.10.12
Retour | 3.2.10
SEOmatic | 3.4.54
Servd Assets and Helpers | 2.9.5
Snaptcha | 3.0.11
Sprig | 1.13.0
Typed link field | 1.0.25
Untransform | 1.0.2

@hhentschel hhentschel added commerce3 Issues related to Commerce v3 bug labels Jun 30, 2023
@lukeholder
Copy link
Member

@hhentschel Could you please send a DB dump and composer.json to support@craftcms.com with a link to this issue and we will take a look! Thanks.

@hhentschel
Copy link
Author

@lukeholder all already sent.

@lukeholder lukeholder self-assigned this Jul 11, 2023
@lukas-jansen
Copy link
Contributor

Having a likewise issue but than in craft 4.
We have ~8k discounts and are both hitting timeouts (100sec, CloudFlare) as memory limits, both tracing back to the recalculation method and especially looping over the discounts

@hhentschel
Copy link
Author

P&T tested it with my db dump and composer files, and the standard commerce templates,
but they could not find any performance issues.
they asked me to test is myself with these files, but i have not had any time to do it.

my plan is to upgrade craft and commerce to v4 the next month and see whats going on then with this upgrade, because
there are some new shipping and sales improvements in v4.
maybe this helps, because right now in v3 i have some custom conditions for shipping and discounts.
please keep this ticket open.

@lukeholder
Copy link
Member

We are working on performance improvements in this branch:

#3221

We can see a few more opportunities and will update you all when we merge it into a release.

@lukeholder
Copy link
Member

Closing this for now as the improvements will be in 4.3 released soon. Make a new ticket with steps to reproduce if you continue to see performance issues. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug commerce3 Issues related to Commerce v3
Projects
None yet
Development

No branches or pull requests

3 participants