Hacker News new | past | comments | ask | show | jobs | submit login

http://vimcolorschemetest.googlecode.com/svn/html/index-c.ht... - the page referenced in the article that shows extreme AdBlock overhead - Chrome just chokes on it for a long time - the tab uses 1.7GB of memory while it is still loading!

With uBlock and FF 38 - the page load completes faster and only about 850MB memory is used in total!

Chrome people should really be doing something about the memory and battery usage on the desktop. It's getting ridiculous.

Also I wonder how things such as OS X's Compressed Memory feature affect this in real life. I mean without the fix, the OS will notice the duplicated, in-memory style sheets and compress them to reduce memory usage and you should not see much of an improvement due to this patch on platforms like OS X that implement memory compression.

(Looking at activity monitor with FF loading the vim color scheme test shows 0MB Compressed Mem for FF - not sure if FF opts out or if there simply isn't enough memory pressure for the OS to start compressing FF's mem.)




> Chrome just chokes on it for a long time - the tab uses 1.7GB of memory while it is still loading!

Chrome 43.0.2357.130 m (64-bit) on Windows 8.1 here, takes 787.6 MB for me (with uBlock). If I open an Incognito window (i.e. no extensions) it takes 109 MB. Not sure where this discrepancy is coming from. Chrome's responsive the whole time.

http://i.imgur.com/QFG2ryq.png


The discrepancy is courtesy of the ad blocker extension.


Chrome extensions run in their own process which means the memory usage is reported separately for each tab and extension. IOW the memory usage for the tab is that of Chrome 100%.


I believe (most) ad blockers work by changing the DOM of each tab. They inject their own CSS to hide elements. The the stylesheets will be processed in the tab's process, not the extension's. This VIM page would be quite heavy on elements that need styling by CSS.


Yes, they do run in their own process. But, so what? Did you expect the ram consumed by the extension to balloon? I didn't. It's clearly evident that these ad block extensions are inflating the memory used by the tab. So, again, why is Chrome to blame for these inefficient extensions?


I was testing on OS X - On Windows 8.1 the page kept loading for a while and then the tab crashed - it used 767Mb before crashing. Probably the extensions you are running are different from me as well - I am running uBlock, Privacy Badger, Lastpass and ChromeCast.

Edit: The crash on Windows 8.1 is reproducible for me. Turns out I'm running a 32-bit build on Windows. But that just very likely means the crash is due to it exceeding the 32-bit process address space limit. I've seen it reach 900+Mb but since the reporting is not real time in chrome://memory it's hard to know at what point it crashes.


I have no idea how I get as low as 109 MB on the page. As for extensions: HackerNew, uBlock (not Origin), Wait! Google Sent Me and Wunderlist New Tab.


In any case since extensions are separate processes I am more perplexed as to how you are getting that low memory usage for the VIM tab. Make sure you wait for the page to load - it takes some time for me to start reaching 900Mb levels and the tab is still loading at that point.


I waited the first time. If I scroll to the bottom of the page I get 98,232 KB. Highest I can get now. Task Manager says close to the same thing, and my computer isn't under memory pressure so I don't expect Windows to have paged out a bunch of Chrome's memory.

http://i.imgur.com/EhHI1Pr.png


http://imgur.com/im0YFhw - 1.6GB on 64-bit build. I get 107Mb in an incognito tab as well. That has got to be a bug - more than 10 times mem usage on regular tab!


1.6GB on 64-Bit Chrome on Windows as well - http://imgur.com/im0YFhw .


So you're blaming Chrome because your Ad Block Plus extension crippled and hosed it? Why don't you try running the same test with Ad Block plus disabled and share your results? That page renders in 112MB and scrolls blisteringly fast in Chrome 45 Dev. With Ad Block Plus installed it chokes it.

People need to stop blaming Chrome and start looking at the havoc their extensions are creating. Whenever I hear a Chrome performance or memory story it invariably always ties back to their extensions.

It's clear why Apple controls and limits modifications to their software. It's to prevent situations like these from erupting and giving their product a black eye because some inefficient extension is in over its head.


Well, for one I don't have Adblock installed. For two, chrome extensions run in their own process which means the memory usage is reported separately for each tab and extension. So the hosing is completely Chrome's fault - 32-bit version just crashes with the tab in question taking maximum memory.


Ok, let's recap:

1) Chrome with no ad blocking extension renders the page in about 112MB with fast scrolling.

2) Chrome with ad blocking extension installed inflates memory.

Seems pretty clear to me where the problem lies.

Also, the issue isn't about these extensions running in their own process as this is simply to prevent a bad extension from taking down the tab. It's about what these extensions are doing to the tab process.


read the comment again, especially the first sentence.


You must have missed the part where he said he's running uBlock.

Last time I checked, it was still an ad blocking extension.


You're missing the point. Chrome with uBlock uses double the memory compared to FF current version with uBlock.


My point has always been that uBlock is doing something to the Chrome tab process renderer that's causing it to consume a lot of memory. The very fact that the example page renders in only 112MB compared to >800MB with an ad blocker installed is proof of this. In the case of Chrome, with an ad blocker installed, they seem to be doing something to the DOM that causes the memory allocated for that renderer to balloon above 1GB. But, the very fact that these ad blockers cause this extreme spike in memory is alarming.

To the layman you would think the removal of ads from the DOM would reduce the amount of RAM consumed. But, just the opposite occurs. Why is this? What are these ad blockers doing exactly and why are they causing these rendering engines to spike in memory usage? But, one thing is clear, whatever they're doing it's the fault of the ad blocker and not Chrome.


Again. Please re-read the original article. Firefox is fixing their inefficient memory management w.r.t. CSS with a later version. That fixed version reduces the memory usage to 450Mb with the same Adblock code. So it wasn't exactly Adblock's fault - it was Mozilla's code that was grossly inefficient and they owned it and fixed it.

Same way, as it stands today, with uBlock FF 38.x loads that site in about 750Mb whereas Chrome with uBlock uses 1.6GB.

Unless you happen to know that uBlock is doing something crazy on Chrome but not on FF, and that Chrome code is 100% without inefficiencies - don't state it like a fact that it is uBlock that is the issue. uBlock is manipulating the DOM - Chrome is using memory for those elements, it is entirely up to them to optimize it if uBlock can work fine with less memory on Firefox while essentially doing the same thing.

Chrome isn't exactly known for being thrifty on memory and battery btw.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: