Facebook Has Announced Its First API Contribution To Google Chrome Browser

Dhir Acharya - Apr 25, 2019


Facebook Has Announced Its First API Contribution To Google Chrome Browser

The world leading social network Facebook has announced that it’s using API to help Google Chrome users browse faster and more smoothly

The world-leading social network Facebook has announced that it’s using API to help Google Chrome users browse faster and more smoothly by reducing the time between a keystroke or a click and the response of the browser.

In computer programming, API (Application Programming Interface) is a set of procedures and functions supporting application creation. API then access data or features which are part of an app, operating system, or other services.

facebook-has-announced-its-first-api-contribution-to-google-chrome-browser-1

Chrome 74 will be the first to trial this new system. Particularly, the JavaScript engine of a browser deals with the way code is executed and the time it stops for a moment to detect any pending input events that it needs to react to. However, modern JavaScript engines are single-threaded which means they can do only one thing at a time.

As per the team explanation, to fix this problem, they break the JavaScript into smaller blocks. When the page is loading, they run JavaScript for a bit, then yield and give back the control to the browser. Then, the browser can check the queue of input events for anything it has to inform the page. The browser then goes back to running the blocks.

facebook-has-announced-its-first-api-contribution-to-google-chrome-browser-2

This process takes a lot of time, causing the page to load slower, but checking for inputs at slower intervals degrades user experience as makes the browser respond slower. So Facebook engineers made the isInputPending API to get rid of this trade-off.

According to Facebook software engineers Andrew Comminos and Nate Schloss in a Monday blog post:

facebook-has-announced-its-first-api-contribution-to-google-chrome-browser-3

By contributing its own API to help improve the Chrome browser, Facebook has marked the new method to develop web standards at the firm. As in the post, now, the “isInputPending” API is part of Facebook’s larger effort in building scheduling primitives into the network.

The social giant would put its new API into trials on Chrome to test among developers who want to get rid of queuing delays as well as strengthen loading and interaction performance. Comminos and Schloss said that they hope to keep driving new APIs as well as to further contribute to open source web browsers.

Comments

Sort by Newest | Popular

Next Story