Regular users of Google Chrome on Windows will note that its use of RAM isn't always ideal. On high to medium-end PCs, this is rarely a problem, but Google has been chasing an issue that causes its browser to take four to five seconds to start on low-end devices.
Thanks to a Microsoft engineer, it may have found a better solution. The bug lies in the way Chrome pre-reads its DLLs via ImagePreReader, taking a few seconds for Chrome.dll and 1.33 second for chrome_child.dll.
According to Microsoft's Joel Laughlin, Google could prevent memory mismanagement by improving the browsers DLL prefetcher.
“The current method of opening the DLL as a file and reading it into RAM causes two copies of the DLL to be in RAM. One who's pages are mapped as MapFile, and one as Image,” he explained in a Chromium bug filing. “They don't share the same physical page as the Image category has additional restrictions due to it being for executable code. Since the pages in RAM as MapFile are unmodified, the memory manager will copy those over to an Image page, so additional IO is avoided. However, there are better ways to do this that should avoid the double mapping.”
Laughlin has since made a commit to change the pre-fetcher to load code into chromium's Image pages rather than MapFile page to reduce CPU and memory usage.
The change is another highlight of the companies' improved relationship since Microsoft made the switch to Chromium. Microsoft has also suggested improvements to scrolling, high contrast mode, and caret browsing.