Increasing the number of lines per step

Closed

Import WP Updated 5 months ago 4 Replies

Ángel asked 5 months ago on December 20, 2023 at 9:51 am

Hi James,

Is there a possibility to increase the number of lines processed per step? Currently, I have it at 20 and in some cases (like importing just the stock) it requires a lot of time. 20000 lines, one hour.

It would be interesting if we could touch this value for each imported file, not all require the same time to process the data.

I look forward to your reply. Thank you.

Regards

J

James replied Support Agent

5 months ago on December 20, 2023 at 4:04 pm

Hi 

The manual running of imports is the only import process that should be effected by this new step limit, if you do need to change this you can use the filter: iwp/chunk_max_records and return a value much greater.

add_filter('iwp/chunk_max_records', function($amount){
    return 100;
});

James

ĂL

Ángel replied

5 months ago on December 21, 2023 at 12:14 pm

Hi James,

Where should I set the filter? 

Thanks for your reply. 

Regards

J

James replied Support Agent

5 months ago on December 21, 2023 at 10:18 pm

I have added the code to a custom plugin so you can install and activate it.

ĂL

Ángel replied

5 months ago on December 22, 2023 at 7:07 am

Hi James,

Thanks, I will try it.


Regards