#Add to cart very slow.
46 messages · Page 1 of 1 (latest)
Not sure but for me was slower and sluggish in development but fast when deployed 🤷🏽♂️
that is also true for me but still not as fast as I would like. I mean its slower then every other website I feel
I agree with that - the cart is very slow and has a very high consumption of queries in DB. However I still need to upgrade to Medusa 1.8+ versions that might help. @compact fiber which version of medusa are you running ?
Cart is fast for me and i'm not even on 1.8 yet
Cart speed has been fixed like a year ago
I'm on 1.7.something
1.7.14?
whatever the latest at 1.7
Anyway I still advise to use React Query or medusa-react queries and leverage the loading state. Have spinners, loading states whenever the adding-to-cart (adding, modifying, deleting) request is happening. This will make the store speed perception feel faster.
Hi @visual crane - yes I remember last year it was really slow and a fix was done that improved a lot the speed. But since few months my add to cart is slow again. It's since I am using tax product override I think.
I got these DB queries that are taking ages when in the checkout process
duration: 2568.129 ms
[DATABASE] [12-1] sql_error_code = 00000 time_ms = "2023-07-03 10:33:18.951 UTC" pid="1282253" proc_start_time="2023-07-03 10:32:42 UTC" session_id="64a2a3ca.1390cd" vtid="22/361401" tid="0" log_line="4" database="" connection_source="176.34.212.68(46238)" user="" application_name="[unknown]" LOG: duration: 2568.129 ms execute <unnamed>: SELECT "Cart"."id" AS "Cart_id", "Cart__region"."id" AS "Cart__region_id", "Cart__region"."created_at" AS "Cart__region_created_at", "Cart__region"."updated_at" AS "Cart__region_updated_at", "Cart__region"."deleted_at" AS "Cart__region_deleted_at", "Cart__region"."name" AS "Cart__region_name", "Cart__region"."currency_code" AS "Cart__region_currency_code", "Cart__region"."tax_rate" AS "Cart__region_tax_rate", "Cart__region"."tax_code" AS "Cart__region_tax_code", "Cart__region"."gift_cards_taxable" AS "Cart__region_gift_cards_taxable",
You can file an issue for that but I know the first answer will be to update to latest 🙂
@safe quartz I am onn
on* 1.11
and here is a link to staging you can test it and see how it feels for you https://new.boardsource.xyz/
Shop all available models only at the ACME. Worldwide Shipping. Secure Payment.
I'm adding to cart and getting 227ms response
Altought no
it takes 3-4 seconds.
is that fast or slow? to you? it feels slow to me still the whole chain, add to cart fetch cart so on
is it slower then your site?
No, it was the preflight that took 227ms. Indeed adding to cart takies 3-4 seconds
Something is messed up
ok cool well at least that, that means it can be fixed
could it be my server hosting?
And what custom code have you added?
ummmm for default add to cart no custom code.
I have a custom route for adding multiple items to cart.
but I havent messed with any cart code other then that. I mean there is lots of custom code all over the place but its mostly in products and such
Even a simple https://backend.boardsource.xyz/store/products takes a lot of time for me
Something is wrong with your deployment
oh thats great news where should I look you think? am using digitalocean app platform setup off the docs for that.
lol >.< ok im going to poke around thank you very much for your help. Do you have a medusa site I can look to feel your speeds?
Do you think think could be from very large metadata in products?
I've always had large metadata in variants and it was not an issue
@compact fiber did you end up solving your issue?
haha yes I did database config problem
@compact fiber Do you mind sharing what the solution was?
yeah our medusa backend server was in nyc and our postgress server was in SF
Have you got all your redis and a search provider set up I use algolia self hosted on the same server and its really fast. I would recomend Digital Ocean Apps . Also is your postgres database on the same server I had similar issues unitill I hosted the backend and front end all on Digital ocean
same here, when backend server and postgress server not in same, SQL statement execution is slow, I guess it might have been caused by using too many transactions