I'm developing a plugin for WordPress that sync up a custom post type with many servers that provide an XML for this purpose. Wordpress has nothing to do, anyway...
The problem is it takes a very long time to perform this process, let's say one XML handles about 300 objects, each object can have up to 50 images and I need to download every single image one by one. In this scenario the process can take maybe 8 hours and the production server don't allow so much time.
I've tried changing php config with this:
ini_set('max_execution_time', 0);
ini_set('memory_limit', '-1');
But I hope to find a solution that doesn't involve to change php execution time and memory limit to unlimited.
Any help will be highly appreciated. Thanks in advance.