JavaScript SDK from 200ms to 20ms | RudderStack

By neub9
3 Min Read

In 2018, Google announced that loading speed would be a significant factor for Google Search and Google Ads. This announcement sparked a major discussion among marketers about the importance of performance. While performance has always been important, especially in eCommerce contexts, it became an urgent issue when Google raised the stakes.

Companies like Google and Facebook have established standards for instant, frictionless app and website performance, making loading speed one of the most crucial factors in any internet experience. If a site’s load time exceeds two seconds, users simply won’t stay on the page.

Site performance can suffer due to various reasons, but the issues are often related to the unoptimized JavaScript that marketing teams want to run on a website. From ad pixels to trackers to CRM embeds, every unoptimized JavaScript SDK is used by marketing to obtain more data.

However, top companies are increasingly treating site speed as an engineering issue, especially when load time directly impacts revenue.

While engineering teams may not be able to avoid every SDK that marketing wants to use, there are modern tools available that allow engineering to provide marketing with the necessary data without sacrificing performance.

In order to improve performance, RudderStack worked with Loveholidays to develop a high-performance JavaScript SDK that reduced execution time from 200-300ms to 20-60ms.

One of the main factors that impacts the performance of a web page is the use of third-party libraries, which can slow down load times in two ways: by loading the libraries to the browser and performing tasks that add latency.

For RudderStack, the complexities related to performance are even greater due to destination integrations impacting library size, and variations in user-defined JSON payloads.

In response, RudderStack developed a high-performance JavaScript SDK that significantly reduced load times for Loveholidays, thanks to a new approach of only loading what is needed and implementing sendBeacon to further improve performance.

Overall, these changes reduced the execution time of the SDK from 200+ ms to 20-60ms, setting a new standard in the space compared to other vendors.

As engineers, RudderStack is continuously exploring new ways to further optimize their SDKs for improved performance, recognizing the increasingly critical nature of performance. Users are encouraged to sign up for RudderStack’s services to experience the benefits of their optimized data pipelines.

Share This Article
Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *