1000s of variations performance: fast for admin only

Created on 7 December 2021, over 2 years ago
Updated 6 December 2023, 7 months ago

Hello!
I know similar topics has been discussed several times before and there was a statement that Commerce was never meant for handling thousands of product variations. However, I noticed that having a product with approx. 5000 variations I can switch quite comfortably between them (max. waiting time for ajax reload is 2.5 sec) as admin. If I do the same as a guest or a regular logged in user, it takes more than 10 sec and consumes lots of memory. I tried to play with cache contexts/tags settings, but it didn't help... What could be other reasons for such a performance degradation?
BTW, there's almost no difference between admin and non-admin when dealing with 300-500 variations product (it takes just a second for both).

πŸ“Œ Task
Status

Closed: works as designed

Version

2.28

Component

User experience

Created by

πŸ‡·πŸ‡ΊRussia LeMieux Moscow, Russia

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States rszrama

    Generally speaking, it's not that Drupal Commerce can't support these sorts of setups, it's that it's never been particularly optimized for it. (As you can see, you have wildly different results as different types of users.) The work here would be to trace those queries, figure out what's slow, and either optimize or avoid them. I've done this before when dealing with massive taxonomies.

    That said, there's not much for us to tease out here in the queue. If someone has a specific optimization, they're welcome to open an issue for that with a patch. We won't be taking on solving this ourselves absent some specific client obligation.

Production build 0.69.0 2024