Chrome as a single process?

Started by Darren Dirt, November 01, 2010, 04:37:26 PM

Previous topic - Next topic

Mr. Analog

Quote from: Tom on November 05, 2010, 12:04:57 AM
Quote from: Mr. Analog on November 04, 2010, 11:54:20 AM
Is it causing any performance issues with other apps?

I have two instances of Chrome open and it's using something like 54.7 MB of RAM but it doesn't impact my system so I don't really care.

That said, Firefox is so mind-bendingly slow that I just don't use it for anything anymore.
Over using memory tends to make me run out of memory, so yes. Even with 4G ram.. And the intel gfx drivers on linux don't like it when you run out of memory. Things start to glitch, and occasionally X might crash (yes, a bug in the driver.. I've been reporting the crashes to the intel linux developers, and they actually get fixed so woo). And then of course theres swapping. Not good for performance, specially on my laptop, got its hdd is slow.

Ahhh, gotcha, ok.
By Grabthar's Hammer

Tom

Quote from: Mr. Analog on November 05, 2010, 12:59:13 PM
Quote from: Tom on November 05, 2010, 12:04:57 AM
Quote from: Mr. Analog on November 04, 2010, 11:54:20 AM
Is it causing any performance issues with other apps?

I have two instances of Chrome open and it's using something like 54.7 MB of RAM but it doesn't impact my system so I don't really care.

That said, Firefox is so mind-bendingly slow that I just don't use it for anything anymore.
Over using memory tends to make me run out of memory, so yes. Even with 4G ram.. And the intel gfx drivers on linux don't like it when you run out of memory. Things start to glitch, and occasionally X might crash (yes, a bug in the driver.. I've been reporting the crashes to the intel linux developers, and they actually get fixed so woo). And then of course theres swapping. Not good for performance, specially on my laptop, got its hdd is slow.

Ahhh, gotcha, ok.
To be honest, I start getting unhappy when I see my memory use meter reach half (not counting cache's and whatnot). Even a modern OS, with my typical use patterns shouldn't use more than 2G regularly. Generally if it gets over half, that means something is horribly wrong somewhere, and it will eventually fill all the way up. Or at least thats my current excuse ;D (of course this doesn't apply when I've got a VM or two open ;D)
<Zapata Prime> I smell Stanley... And he smells good!!!

Darren Dirt

Quote from: Darren Dirt on November 02, 2010, 11:37:28 AM
http://www.youtube.com/html5

^ been using it for quite some time now, works great (and when it won't work, then Flash kicks in) ... but WARNING: funny "joke" by the Google devs, if you right click the HTML5 video during playback and choose "Save As..."
_____________________

Strive for progress. Not perfection.
_____________________

Mr. Analog

Quote from: Tom on November 06, 2010, 03:11:22 AMTo be honest, I start getting unhappy when I see my memory use meter reach half (not counting cache's and whatnot). Even a modern OS, with my typical use patterns shouldn't use more than 2G regularly. Generally if it gets over half, that means something is horribly wrong somewhere, and it will eventually fill all the way up. Or at least thats my current excuse ;D (of course this doesn't apply when I've got a VM or two open ;D)
Hmm, well now that's a pipe of a different colour. Being aware of resource usage changes how a person thinks significantly.

Sort of like how time is relative to the observer, go a day without looking at a clock and compare that to a different day where you check your watch every 15 minutes, it's pretty startling.

Things on a computer sometimes seem slower when you think of resources are being "taken" (instead of being used).

I've actually seen this behavior in clients when testing a "new" version of the application. They automatically think it's going to be worse and when they run their test they get a higher number of negative results, we blind-tested this once by telling them we had installed a newer version of the app and had them test...
By Grabthar's Hammer

Lazybones

Root problem.. Flash sucks even harder under linux so you should block it or unload it.

Newest builds of Chome let you load FLASH on click instead of default http://www.webmonkey.com/2010/11/chrome-now-offers-click-to-play-option-for-flash-other-plugins/

Mr. Analog

Quote from: Lazybones on November 12, 2010, 10:10:30 AM
Root problem.. Flash sucks even harder under linux so you should block it or unload it.

Newest builds of Chome let you load FLASH on click instead of default http://www.webmonkey.com/2010/11/chrome-now-offers-click-to-play-option-for-flash-other-plugins/

That's a pretty handy feature. I know a lot of guys who roll around the 'net with noflash/noscript enabled. I find the net navigable enough with just AdBlock though.
By Grabthar's Hammer

Darren Dirt

Quote from: Lazybones on November 12, 2010, 10:10:30 AM
Root problem.. Flash sucks even harder under linux so you should block it or unload it.

Newest builds of Chome let you load FLASH on click instead of default http://www.webmonkey.com/2010/11/chrome-now-offers-click-to-play-option-for-flash-other-plugins/
^ that's how I usually have Flash, via one of the Flash Block extensions ( https://chrome.google.com/extensions/detail/gofhjkjmkpinhpoiabjplobcaignabnl ) ... but if it's now built-in to be "disabled until you click it" then I'm very happy, can go back to CTRL+clicking 20 Youtube tabs at a time ;)
_____________________

Strive for progress. Not perfection.
_____________________

Tom

I've actually been testing out Chromium lately. Just because I have a love-hate relationship with iceweasel. It does seem to use a lot of memory still, but the tab process separation is actually a god send in this case, if you close a tab thats using a lot of memory, the kernel can actually free that memory, since the process has exited. Not so with a single process, most libc's will NOT give back memory to the OS once its been (s)brk'ed. So even after closing a bunch of tabs in iceweasel, most of its memory use won't reduce, however with chromium it does \o/ and that makes me happy. What doesn't make me happy is I tend to have to clean up my tabs quite often, since it uses more memory per tab...

Oh, and it seems both Chromium and Iceweasel have a nice memory leak with a silly little bandwidth monitoring page I set up. It could very well be my fault, but as far as I can tell, the only "leak" I intentionally have in the js is a Graph object I recreate every update, rather than re use it. But then browsers tend to have memory leaks in their innerHTML handling it seems. Do a lot of repeated dynamic generation, and they all have a history of leaking a lot...
<Zapata Prime> I smell Stanley... And he smells good!!!

Mr. Analog

Quote from: Tom on November 13, 2010, 05:02:15 AMOh, and it seems both Chromium and Iceweasel have a nice memory leak with a silly little bandwidth monitoring page I set up. It could very well be my fault, but as far as I can tell, the only "leak" I intentionally have in the js is a Graph object I recreate every update, rather than re use it. But then browsers tend to have memory leaks in their innerHTML handling it seems. Do a lot of repeated dynamic generation, and they all have a history of leaking a lot...

Well, it's partially the browsers fault for not cleaning up orphaned elements but I know for a fact that innerHTML can run away on you on any browser. You're dynamically adding and removing elements and handlers from the DOM without going through the DOM itself so the browser has to do all the heavy lifting and frequently loses track of event handlers and orphans DOM elements. Orphaned elements and event handlers will use memory but are completely inaccessible to the DOM making it impossible to delete them. I found a hack for this in IE6 but I'm not going to share it because it's vile and absolutely the last resort (sort of like eating people to stay alive). It would be much better to rewrite your code so it directly adds/removes elements through the DOM Level 2 API, way cleaner.

I would say this is a fairly common problem among developers, it's easy to forget what's going on with memory in a scripting language (I know because I forget all the damn time).

Woo! New forum Achievement: Cannibalism and DOM Level 2 in one paragraph! :rofl:
By Grabthar's Hammer

Darren Dirt

#24
Quote from: Mr. Analog on November 13, 2010, 07:22:43 AM
Woo! New forum Achievement: Cannibalism and DOM Level 2 in one paragraph! :rofl:

dammit my stupid trivia-filled brain just HAD to go re-find this...
http://www.youtube.com/watch?v=B1A-Ymf1VYY <-- NSFW/kidunfriendly warning obv.
_____________________

Strive for progress. Not perfection.
_____________________

Mr. Analog

Quote from: Darren Dirt on November 13, 2010, 10:45:16 AM
Quote from: Mr. Analog on November 13, 2010, 07:22:43 AM
Woo! New forum Achievement: Cannibalism and DOM Level 2 in one paragraph! :rofl:

dammit my stupid trivia-filled brain just HAD to go re-find this...
http://www.youtube.com/watch?v=B1A-Ymf1VYY <-- NSFW/kidunfriendly warning obv.

Achievement: Laughed ass off at linked forum video!
By Grabthar's Hammer

Tom

Well I'm actually using prototype's update and insert methods. Whether or not they use innerHTML themselves, I don't know.
<Zapata Prime> I smell Stanley... And he smells good!!!

Mr. Analog

Quote from: Tom on November 13, 2010, 11:42:32 PM
Well I'm actually using prototype's update and insert methods. Whether or not they use innerHTML themselves, I don't know.
Well, generally JavaScript frameworks abstract these operations but give you configuration options to use on method or another where available. Hopefully Prototype gives you some control over that otherwise youch!.
By Grabthar's Hammer

Tom

I was just being lazy. I really don't like to use the document.createElement stuff for every single node. Its soo tedious.

Especially once I get to making a fancier ui for the new backend I'm writing using libpcap. The new web interface will be somewhat fancy.
<Zapata Prime> I smell Stanley... And he smells good!!!

Mr. Analog

Quote from: Tom on November 15, 2010, 05:25:28 PM
I was just being lazy. I really don't like to use the document.createElement stuff for every single node. Its soo tedious.

Especially once I get to making a fancier ui for the new backend I'm writing using libpcap. The new web interface will be somewhat fancy.

That's why I like stuff like Dojo, I don't have the time any more to muck around with designing GUI, I just want something that's skinnable and has a decent API

Good on ya!
By Grabthar's Hammer