myparcelnl / prestashop

PrestaShop module to integrate with MyParcel NL and BE
https://developer.myparcel.nl/nl/documentatie/11.prestashop.html
10 stars 5 forks source link

Orders page incredibly slow #223

Closed Xesau closed 9 months ago

Xesau commented 1 year ago

Module version

1.8.2

PrestaShop version

1.7.8.6

PHP version

7.4.33

What went wrong?

The orders page loads incredibly slowly, around 15 seconds without caching and 5-7 seconds with Memcache via CacheMemcached. This is unworkable for our client.

The slow code is in hookActionOrderGridPresenterModifier in src/Module/Hooks/OrdersGridHooks.php. It creates a very large number of database requests and uses a lot of memory. The shop has had many orders in the past years, so this inefficient querying causes very slow responses.

The solution to this problem would be to rewrite this code to use fewer SQL queries and request more data in parallel using appropriate JOINs.

Reproduction steps

  1. Have many orders in your database.
  2. Navigate to Orders
  3. Wait for 15 seconds
  4. Page loads

Relevant log output

No response

Additional context

No response

wthijmen commented 1 year ago

Hi @Xesau,

Currently, we are busy with a new version of the Prestashop plugin. This version will solve the loading problem on the order page. I can not give you an exact date when this version will be released, but it's combined with the PDK.

Just keep an eye on the release page.

King regards,

Thijmen, MyParcel

Toyboy125 commented 1 year ago

@wthijmen any news about new update???

EdieLemoine commented 10 months ago

Hi @Toyboy125, I've written an in-depth comment here, if you have any further questions please don't hesitate to contact us.

EdieLemoine commented 9 months ago

The first beta version of the next version of our module is out now where this should not occur anymore.

Please read this issue for more information and how to report bugs in the new version, if you're interested in trying it out. Feel free to open a new issue if you notice the performance is still not good enough.