extremely long loading times in backend
Description
Hey, so, we are importing a lot of products with even more variants into craft. We do have products, and some of them have more than 100 variants each with various fields (over all products I think 5000 variants in total). The problem is that the loading time in the backend is just way too long. For our largest product (over 100 variants), I sometimes need to wait over 15s until the backend has finished loading. We tried disabling different plugins (like seomatic for example), executing the queue with a cronjob, execute garbage collection, and such things but nothing changed. In the debug bar, we see a lot of duplicated db queries, maybe this is a result of all variants having related stuff and colors for example which are categories in craft, but then it should be enough to fetch them once. Some of them are 120 times duplicated as it seems. We really don't want to wait up to a minute sometimes, until a product is saved and loaded again, so we would appreciate every help or idea.
Steps to reproduce
Cannot share public links at this stage.
Additional info
- Craft CMS version: 3.7.14
- Craft Commerce version: 3.4.3
- PHP version: 7.4.24
- Database driver & version: MySQL 5.5.5
- Plugins & versions: Amazon S3: 1.2.15 Commerce Currency Prices: 2.7.3 Craft Commerce: 3.4.3 Element API: 2.8.3 Gold SiteCopy: 0.6.4 Image Hotspots: 1.2.0 Mollie for Craft Commerce: 3.0.0 Neo: 2.11.13 Redactor: 2.8.8 SEOmatic: 3.4.15 Super Table: 2.6.8 Translations admin: 2.4.7 Wishlist: 1.4.11
We are currently looking into supporting eager loading in the Product edit page and will give you an update when we have some news.
nice, thank you for this 🚀