craftcms/commerce

[5.x]: Loading products/variants takes a long time on MariaDB 10.6

Closed this issue · 2 comments

What happened?

Description

Creating a new variant in a product takes a lot of time. Adding an asset field to the product type adds even more load time. Switching from MariaDB 10.6 to MySQL 8.0 fixed the problem. May be related to #3645.

I tested everything in a new project and uploaded a screencast of the problem to YouTube: https://www.youtube.com/watch?v=Qj-CVKthh3k

Let me know if you need more details.

Steps to reproduce

  1. Create a product type
  2. Create a product
  3. Add Title and Default Variant
  4. Save the product
  5. Add second variant
    After some loading time the second variant will be added.

Expected behaviour

Adding a new variant should not take too long.

Actual behaviour

Adding a new variant takes a long time. The larger the project, the longer the load times.

Craft CMS version

5.4.2

Craft Commerce version

5.1.0.1

PHP version

8.3

Operating system and version

Linux and Windows 11

Database type and version

MariaDB 10.6

Image driver and version

DDEV

Installed plugins and versions

  • "craftcms/ckeditor": "4.2.0"
  • "craftcms/cms": "5.4.2"
  • "craftcms/commerce": "5.1.0.1"
  • "ether/seo": "v5.0.0-rc5"
  • "matthiasmullie/minify": "^1.3"
  • "mmikkel/cp-clearcache": "2.0.1"
  • "studioespresso/craft-dumper": "5.0.1"
  • "vlucas/phpdotenv": "^5.4.0"
  • "voku/html-min": "^4.0.0"
  • "craftcms/generator": "^2.0.0",
  • "yiisoft/yii2-shell": "^2.0.3"

Hi @craftunit-liam

Thank you for your feedback. Watching the video you provided it is obviously that it is running extremely slowly. We haven't noticed that level of performance in our testing of MariaDB.

Glad you were able to get things working well on MySQL. On that, it is worth noting that although we still support MariaDB in Craft 5 and Commerce 5 it is no longer a recommended database engine: https://craftcms.com/docs/5.x/requirements.html#minimum-system-specs

Will close this issue for now, but will continue to monitor any further MariaDB issues raised and continue our testing internally.

Thanks!