Google has shared details about a recently introduced Chrome feature that changes the way cookies are requested. Tests show improved performance across all platforms, Bleeping Computer reports.

In the past, single-processor browsers easily managed cookies because the data was stored in memory. However, modern browsers like Chrome use multiple processes to improve performance and security.

Chrome starts a new process for each window and some other functions. This means that the method that handles cookies has to deal with more requests, which can slow down performance.

Google has found that some websites request cookies multiple times, which creates an unnecessary load and slows down the work.

Additional metrics have been developed to measure how often the IPC’s GetCookieString() function is redundant (returns the same value as the last time) across all navigations.

As a result, it was found that 87% of the cookie requests were redundant and that in some cases this could occur hundreds of times per second.

In some cases, especially when multiple sites were making quick requests at the same time, these requests were happening hundreds of times per second, resulting in significant delays. Eventually, the old way of synchronously fetching cookies (one at a time) from a network service became an obstacle to performance.

To fix this, Google introduced a new system called Shared Memory Versioning, which was enabled by default in March. Instead of constantly checking with a network service, Chrome now stores a local copy of the cookie data and its version number.

This allows Chrome to check if a cookie contains the most recent data without making repeated requests.

Chrome

According to Google engineers, this change has reduced the number of cookie-related notifications by 80% and accelerated access to cookies by 60%.

Each document.cookie value now corresponds to a monotonically increasing version. Each renderer caches its last document.cookie check.

The network service stores the version of each document.cookie in shared memory. This way, renderers can find out if they have the latest version without having to send an inter-process request to the network service.

In preliminary tests, Google has noticed that the update improves performance by 5% across all platforms. Step by step.