So it is almost time to welcome the delightful festivals – Thanksgiving Day, Black Friday, and Cyber Monday....
TechCrunch is one of the leading technology media properties, providing profiling startups, reviewing new Internet products, and breaking tech news. In 2012, the team of TechCrunch developers, named Nicolas Vincent, Alex Khadiwala, Eric Mann, and John Bloch has started working on the TechCrunch redesign to enhance site’s performance using many tools to achieve goals.
This time, the team comes up with its WP Async Task Library, which is an open source library that was created to offload time-consuming tasks into background tasks. The main aim of this async task library is to recognize anything on page load that effect negative to better performance and consign it to a background task. Alex and Nicolas give an example about how library is helpful to minimize API calls when loading CrunchBase cards:
On the TechCrunch site, loading CrunchBase cards on article pages is an example of a process that could slow down the site, since the information needed for each card becomes available via the CrunchBase API. To improve performance, we cache a copy of their data for about 12 hours. But when we initially retrieve that data or refresh it, we don’t want the API call to affect our page load time.
In both instances, we instead kick off an asynchronous call back to our site with the instruction to retrieve and cache this data to be available the next time it is needed, instead of waiting for a response from their API.
Before TechCrunch’s performance issues, the site could take up to 17 seconds to load, but after the new task library, the situation has been better. The team reported, “Since the redesign, we’ve improved overall performance by 5 to 8 times by implementing the WP Async Task library, among other important back-end and front-end improvements”.
One can get WP Async Task as a standalone plug-in or developers can bundle it into their own themes and plug-ins. Its quick start section displays information about how to use it in your own code. All thanks to the TechCrunch development team as they have provided the potential to benefit many other media WordPress sites through WP Async Task. Get code from GitHub under the MIT license. You can also make contribution to make this code more flexible.