verbb / postie

A Craft Commerce shipping calculator plugin.
Other
12 stars 18 forks source link

Postie setting very slow #119

Closed hassanmah closed 8 months ago

hassanmah commented 8 months ago

Describe the bug

I have around 100,000+ products, when trying to access the settings panel in the cp, it's very slow (ie 5 mins and still not loading), but locally it returns a 504.

I'm trying to change a setting returned by DHLExpress, I think it has something to do with days. Can't remember the exact label of the field

It was ok when there were like 3000 products

Steps to reproduce

  1. Click on settings from the plugin settings page

Craft CMS version

4.7.0

Plugin version

3.1.4

Multi-site?

No

Additional context

No response

engram-design commented 8 months ago

That would be due to our helper trying to fetch all products to determine if they have dimensions and weights. This will be changed in Postie 4 to not be on the same page as other settings, so it won't interfere like it is here.

For now, I've added a 100 limit to the number of products queried.

This is also overridable via an event

Fixed for the next release. To get this early, run composer require verbb/postie:"dev-craft-4 as 3.1.4".

hassanmah commented 8 months ago

@engram-design thanks that fixed it