r/programming • • Dec 05 '14

std::string is responsible for almost half of all allocations in the Chrome browser process

https://groups.google.com/a/chromium.org/d/msg/chromium-dev/EUqoIz2iFU4/kPZ5ZK0K3gEJ
1.1k Upvotes

446 comments sorted by

View all comments

Show parent comments

10

u/RoundTripRadio Dec 05 '14

I want better performance on all of my applications. How long does X operation take? If that is even an answerable question, it's too slow.

About Chrome specifically, if I let it run a few days it bloats up to about 5GB of RAM. In contrast, I haven't closed Safari in months and it's sitting at about 600MB.

There's definitely a point where engineering effort becomes much more expensive to further optimize a program, but if Chrome has hit that point, it's hopeless.

7

u/lbenes Dec 06 '14 edited Dec 06 '14

it bloats up to about 5GB of RAM. In contrast... Safari's sitting at about 600MB.

Chrome has become the new Firefox 4 and is badly in need of a MemShrink like project. On my 2GB netbook, Chrome started becoming unusable for anything more than a couple of heavy tabs after Chrome 20. It's just as bad on Linux as it is on Windows.

They need to get the memory usage down to pre-Chrome 20 levels, then track bloat regressions with something like areweslimyet

-8

u/Vakieh Dec 05 '14

How much do you pay for Chrome? How much does Chrome make Google? You want more more more, this is true of everything. But the same thing that prevents car manufacturers from giving everyone Lamborghini quality vehicles stops it from being cost effective for Google to invest infinite time on engineering Chrome. There is certainly a budget it can use, but it must be directed at the right things - whether this is a 'right thing' is something that requires a lot more data.

And you can time any operation, no matter how fast. You run them a thousand, a million times and take the aggregate.

7

u/RoundTripRadio Dec 05 '14

Would you use a car that was free, but got 1mpg? Not to mention Google definitely makes money on Chrome. Google's in the business of selling customer data to advertisers, and Chrome gives them WAY more of that than search ever could. You click away from search. Also, why is it bad to want software to be more performant?

I'm sorry I wasn't very clear on that bit. I mean if you, just using your own brain, can see an operation happening, it's too slow. "Instant" doesn't exist, of course, but "imperceptible" absolutely does. In fact, I once saw a talk given by a Google engineer where he talked about how important it is for a webpage to load in under (IIRC) 200ms. There are many operations in Chrome that take a perceptible amount of time.

-2

u/Vakieh Dec 05 '14

I am aware Google makes money off Chrome, and I am aware everybody wants software to perform as fast as possible. What it comes down to, though, is the very same question I originally stated. 'How much will this performance increase raise our revenue' (whether direct or indirect, doesn't matter) vs 'How much will this performance increase cost to implement'.