0

I'm using drupal commerce for ecomerce project. Shopping cart views with 100-200 line_items renders extremely slow - 5-10sec. How to fix it?

0

1 Answer 1

1

This is too vague to really answer well. A View may be slow for any number of reasons, but at a minimum, this View is loading 200 entities and potentially 400 if you're joining to products (or any other entity). You're going to need some pretty aggressive query caching, both at the database level and likely at the Views level, to perform at that scale of carts without having to change the way Drupal Commerce loads / manages cart orders.

2
  • Maybe to create my own views field handlers for shopping cart form views, which will not load full entity line_item and corresponding product entities? Or it is bad idea and is not Drupal way?
    – Dmitriy
    Aug 7, 2016 at 18:57
  • Well, it's a Views problem, not a Commerce problem. Views itself loads all of the entities and our field handlers are just responsible for rendering already loaded data. Anything is possible with custom code, including a custom shopping cart block or shopping cart form. Aug 11, 2016 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.