Here’s some code to limit this. This can be placed into a theme or plugin.
<?php
/*
* The SharePulse plugin is intended to work with an unlimited number of posts
* But since it is attempts to process them all at once, this will not work as
* intended with sites with enormous numbers of posts
*
* This function works around this limitation by limiting the number of posts.
*
* @param array $args The arguments
* @return int The number of posts to process
*/
function sharepulse_limit_number_of_posts( $args ) {
$args['posts_per_page'] = 1000;
return $args;
}
add_action( 'sp_get_posts_args', 'sharepulse_limit_number_of_posts' );
It may be sensible to change the default value in the core plugin though, as at least with 1000 posts it will probably work, whereas with an unlimited number of posts it will simply fail on huge sites.
Iterating through in sections would be even better. That way it could process them in batches of 100 or so to avoid hammering the server too aggressively.
Many services such as WordPress.com VIP will actually disallow anything which attempts to use a post count of more than 100 due to the risk of excessive server load, so even 1000 is quite high.