Last week we launched a lighter and faster Activity social plugin that we rewrote from the ground up. This is yet another plugin relaunched with page-loading performance in mind, following our recent Send, Like, Likebox, Login, Facepile, and Recommendations plugin optimizations.

Here’s a before/after comparison done with WebPageTest:

Overall, the plugin is 5x lighter (257K total payload before vs. 48K after) and makes fewer HTTP requests (5 now vs. 18 before).

The plugin loads nearly 2x faster (0.6s vs 1.14s before) and the initial painting starts in nearly half the time (at 0.38s vs. 0.68s before).

These performance optimizations were mainly about static resources: rewriting and reducing the sizes of JavaScript and CSS components, untangling dependencies, and improving packaging. Also, all of the CSS is now in-line to help with initial rendering times. Thanks to the reduced component sizes, even though all of the CSS is now in the HTML, the total HTML payload remains flat at 5K before and after.

For more information on our various plugin optimizations, check out these technical posts:

Stoyan Stefanov is a software engineer on the platform infrastructure team.

Leave a Reply

To help personalize content, tailor and measure ads and provide a safer experience, we use cookies. By clicking or navigating the site, you agree to allow our collection of information on and off Facebook through cookies. Learn more, including about available controls: Cookie Policy