I created some simple products programatically. I need to create nearly 70k products programmatically only. Now it is taking so much time(nearly about 40 hours). So please give some solution to reduce the time. Thank you in advance.
This is not a fully working solution, but an idea.
Instead of creating products by going through
$model->save() which takes about 2 eternities you can try a different approach.
You can try to simulate an import.
Not sure if it will work for 70k products at once but you can do it in batches.
Now the approach.
You obviously don't want to create csv files and upload them manually. But you can do this once for a file with 2 or 3 products and see what happens.
From what I remember, the import script parses the file and inserts the data into a table in a json format (
You can try to short-circuit this process and generate a json with some products and insert it into that table.
Then run the script that is executed when you press the import button.
This should take the batch from the db and create the actual products.
Here is some code I wrote 2.5 years ago for a similar problem, but unfortunately I don't remember much about it.