Currently if the script is used to pull share counts on a single post/page that only results in 1 API call to SharedCount which is negotiable on performance.
If the project requires using share counts on an archive page, in some instances if many caches go stale, then we end up with many API calls on page load which then noticeable slows down the page rendering (as reported by @billerickson).
The solution is to either add support for WP Async Task and enable it by default or add it and then use it via a filterable toggle switch.
I actually think the issue is multiple calls to update_post_meta(), not necessarily multiple calls to their API, but either way this would fix the problem
See https://github.com/techcrunch/wp-async-task
Currently if the script is used to pull share counts on a single post/page that only results in 1 API call to SharedCount which is negotiable on performance.
If the project requires using share counts on an archive page, in some instances if many caches go stale, then we end up with many API calls on page load which then noticeable slows down the page rendering (as reported by @billerickson).
The solution is to either add support for WP Async Task and enable it by default or add it and then use it via a filterable toggle switch.