Exporting Order Items is slow with a Date Range
We have an xcart 4.1.12 running on PHP5.6 MySQL 5.1.73 (soon to be upgraded)
In this xcart we can export all orders and all order items in one go, and it works. But if we add a date range by searching for orders and ticking export to csv (in this example, 1 year (10,000 orders)) it didn't work.
To be more specific, it exported the orders but when it got to order items it just stopped at "Exporting order items..."
So I've looked at the code and I found out why this was happening - for every loop of func_export_get_row, its executing a query to get the entire orders list for that date range which is slowing it down.
I've made some changes to include/export.php to solve this (diff is attached). With the change the page hangs for about 2 minutes on "Exporting order items..." and then continues.
I was hoping for some feedback on this change because this bit of code is still the same in xcart 4.7.6 (although it has moved to func.export.php).
Re: Exporting Order Items is slow with a Date Range
I've forwarded this information to the XC4 dev team.
|All times are GMT -8. The time now is 11:28 AM.|
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.