Top
Best
New

Posted by hrncode 12 hours ago

LinkedIn uses 2.4 GB RAM across two tabs

https://ibb.co/fYQVfMWp https://ibb.co/MyTNnrGQ
437 points | 275 commentspage 2
bvan 6 hours ago|
As much as you all dislike LinkedIn and the cringy posts, keep in mind that for certain parts of the market it is >the< main professional forum. It is where your investors live, and their capital providers live. So, play nice, yeah?
xantronix 6 hours ago||
Actually I think I'll play mean, specifically _because_ I want to be radioactive to investors and private equity. I sincerely believe there is a better way to exist and work without being beholden to a system that incentivises quarterly thinking at the cost of everything else.
sgustard 2 hours ago|||
Yep, I've co-founded several companies and sold them for near $1B in aggregate. My investors and customers are on there, sometimes posting nice things about us. So I give it a thumbs-up and move on. Nothing worth rage-bating about. Mostly I go there to play linkedin.com/games.
debesyla 6 hours ago|||
For sure higher quality social network than Facebook. I personally like it. (Note that I follow only lithuanian posts. It may be our local language specifics.)
mwkaufma 2 hours ago|||
What does that have to do with RAM?
bvan 2 hours ago||
Absolutely nothing, as 99% of comments to the post. But it is the norm on HN it seems.
jnovek 6 hours ago|||
I think I’ve legitimately taken career hits because I cannot stomach it. The culture of LinkedIn is absolutely repulsive to me.
graysonk 5 hours ago|||
“What trying to protect the feelings of a group of people who will never care about me taught me about b2b sales”
Aurornis 4 hours ago|||
The VCs I know think the LinkedIn feed is a joke, too.

Most people use it for messaging and keeping contacts. The feed and the posturing that occurs on it is a weird sideshow.

isatty 6 hours ago|||
I give 0 fucks about it.
throwuxiytayq 3 hours ago|||
I know a lot of people who use LinkedIn, and I don't think any of them are happy with their job. Play stupid games, win stupid prizes.
phyzome 4 hours ago||
I sell my labor. I don't sell my respect.
neeeeeeal 6 hours ago||
Is it not possible to collar the amount of RAM a browser tab is able to use? If not, would love for someone to develop this!
aquir 6 hours ago||
Web developers of HN: how is this possible? What can use 1.2GB RAM for a website? Preloaded all videos?
lkbm 5 hours ago||
Keep in mind this is memory used by a browser tab, not "how bug the website is". Probably a memory leak as the feed is scrolled or something, but it is a massive download when you first load the page.

I'm seeing 72MB in the network tab (7MB transferred--that's due to compression). An incredible 10MB is HTML (800K transferred), a more incredible 11MB of CSS (500K transferred), 25MB of JS (3MB transferred), 16MB XHR (1MB), 17MB images (1.7MB transferred).

A lot of the HTML is inline JS in `window.__como_rehydration__` -- letting a server-side rendered be dynamic as if it were fully client-side rendered.

The size of the CSS also presents in bloated HTML. Why not have 18 classes on your button? `<button class="_5732bd68 _4cbf0195 _00dac29f _737a8a8c b241f848 _9572431e _56fd9a8a ff367c5b f7a6e63a aa661bbd b1e8a5cc d6e0deb3 _0582e059 f7e4b8f0 f9d5d3fb e037a5e8 _340d09d4 fbc7d17b" ...`

socalgal2 4 hours ago|||
Honestly, while I'm sure Linked is bloated, HN in Chrome is taking 204meg for the front page on my MBP. That's with no images, no videos, a minimal amount of css. `document.body.textContent.length` says 4278

Checking again it went down to 78meg. Still 78MEG!!! Thats over 1200 Apple IIs, Commodore 64s. I use to run Windows 3.1 for Workgroups, and in it run Microsoft Word, Excel, etc, on machines with 4meg. Now, a simple page of text is taking 78

I get why to some degree. It's highres 32bit display, multi-layered. The screen itself requires 36meg (40bit RGBA, 40bit because it's an HDR display). Each window itself is a texture. If the window is the same size as the screen then that's 36meg. Font Glpyhs are high-res antialias.

Compare that to my Windows 3.1 machine. OSes didn't use textures then and didn't anti-alias. GPUs didn't exist and the screen was 1024x768 or something small like that. Software rendering from fonts that were 1 bit per pixel.

I'm not saying that excuses browsers nor LinkedIn. Rather, if you go add up the basic pieces you'll find that part of the reason these things take lots of memory is because these things take lots of memory.

xantronix 5 hours ago|||
That's the sort of question a reasonable person would ask. To answer this correctly, you need to occupy the mind of a madman. Now, we've got a boatload of KPIs to optimise or our necks are on the chopping block!
jackkinsella 5 hours ago||
Probably a memory leak

But other ideas: - all pages of FE site loaded at once instead as as needed - FE indexed search engine - bug rendering too many invisible HTML elements (eg 1M select boxes)

SilasX 4 hours ago||
Then why does pretty much every site seem to have a "memory leak" of this type (besides unicorns like HN that try to be minimal)?
gitmwnkdkc 1 hour ago||
That’s nothing. I’ve seen the Azure portal using >5gb in a single chrome tab.
dzonga 8 hours ago||
for jobs - indeed is better or other small avenues in their heyday such as HN who is hiring (all my jobs have come through hn)

other avenues - local slack channels.

linkedIn - good for initial connection with strangers you don't know and might find valuable

linkedIn - good for keeping tabs on companies or new startups

mrweasel 6 hours ago||
It probably depend on where you live and who you are. LinkedIn is my backup in case of a layoff. It's the site where I can reach everyone who worked with me or have made offers in the past.

If you do what I do, live in my general area and know the right people (which I do), LinkedIn will get you an interview or three lined up in a day or two. None of these people are on Indeed, HackerNews or even Slack.

kjkjadksj 4 hours ago||
I think before linkedin people were doing this with email and phone. Literally cold calling your old coworkers. Not sure linkedin really created anything that didn’t exist previously especially if you live in some major hub of industry as you indicate.
mrweasel 3 hours ago||
It did make it easier though. I don't have to keep a list of potentially outdated phone numbers and email adresses. LinkedIn makes it much simpler to broadcast your availability.

Most of LinkedIn is just garbage though, especially if you somehow connected with social-media people or marketing people. Marketing people on LinkedIn are weird, they can't form coherent sentences and they can't even sell themselves.

You could strip down LinkedIn down to your resume, availability status and your email address and it would be fine.

sp1982 6 hours ago|||
try https://corvi.careers I been building it purely as job search platform, has good coverage of startups and public companies but I’d still recommend to use LI for network tho
catcowcostume 7 hours ago||
??? Who outside of startups (in a professional environment) even use Slack?
kristopolous 8 hours ago||
Always thought people should be organizing cross industry unions and planning strikes on the platform.

Why not?

kjkjadksj 4 hours ago|
Most of the heavies in my industry don’t even bother with linkedin. They get plenty of applications on their career pages already I guess. Only really startups (which aren’t really hiring at all) and the occasional blast from a middle weight company. There are more jobs for ai trainer than real jobs on linkedin right now.
dijit 4 hours ago||
Nearly all the top level comments are about the value of Linkedin at all rather than the technical reasons that 2.4G of RAM for a website is atrocious.

Can we talk about how it's possible that any application short of video editing can require so much RAM?

In fact, I've done video editing on computers with 1GiB of RAM back in 2004 and it worked fine, (for the 1024x768 resolution which was en vogue at the time)..

Is linkedin doing something complex? Is there a reason that it requires more resources than my entire computer from 20 years ago, or my entire operating system, text editor and compiler today?

barbegal 7 hours ago||
I don't understand why people get so hung up on Chrome using so much memory. A lot of this memory is "discardable" so will get dropped when the system is under memory pressure and the amount of memory allocated for this type of usage will depend on how much memory your system has available. If Chrome is using lots of memory then it's almost always because your system has lots of available memory. It allows the browser to cache large images and video assets that would otherwise have to be re-downloaded over the internet.
lucb1e 7 hours ago||
Or another process will die at random instead, which might be your desktop environment, the main browser process, Signal (10% chance at corrupting message history each time), a large image you were working on in Gimp...

Firefox has gotten very good at safely handling allocation failures, so instead of crashing it keeps your memory snugly at 100% full and renders your system entirely unusable until the kernel figures out (2-20 minutes later) that it really cannot allocate a single kilobyte anymore and it decides to run the OOM killer

but also

it's not cheap? Why should everyone upgrade to 32GB RAM to multitask when all the text, images, and data structures in open programs take only a few megabytes each? How can you not get hung up about the senseless exploding memory usage

Pannoniae 3 hours ago|||
I dunno I have 96GB of RAM and I still get the whole "system dies due to resource exhaustion" thing. Yesterday I managed to somehow crash DWM from handle exhaustion. Man, people really waste resources....
surajrmal 7 hours ago|||
That's not how it works. Process killing is one of the last ways memory is recovered. Chrome starts donating memory back well before that happens. Try compiling something and see how ram usage in chrome changes when you do that. Most of your tabs will be discarded.
lucb1e 6 hours ago||
I've already described above what the browser's behavior is. That your browser works differently is good for you; I'm not using a Google product as my main browser. There are also other downsides that this other behavior does not fix, mentioned in sibling comments
surajrmal 6 hours ago||
This is not a chrome problem but an OS problem. Android does a much better job here by comparison. Desktop Linux is simply not well optimized for low RAM users.
g947o 3 hours ago|||
Reclaiming memory is not free.

It's better not to use 2.4G RAM in the first place. Imagine LinkedIn isn't so hostile to users and instead actually cares about user experience.

progval 7 hours ago|||
It's memory that the kernel cannot use to cache other applications' files.
surajrmal 7 hours ago||
This isn't true for OS like Windows where the kernel is informed that the memory is discardable and it can prioritize discarding that memory as necessary. It's a shame that Linux doesn't have something similar.
progval 3 hours ago||
Linux supports it too through madvise():

       MADV_FREE (since Linux 4.5)
              The application no longer requires the pages in the range
              specified by addr and size.  The kernel can thus free these
              pages, but the freeing could be delayed until memory
              pressure occurs.
and

       MADV_DONTNEED
              Do not expect access in the near future.  (For the time
              being, the application is finished with the given range, so
              the kernel can free resources associated with it.)

              After a successful MADV_DONTNEED operation, the semantics
              of memory access in the specified region are changed:
              subsequent accesses of pages in the range will succeed, but
              will result in either repopulating the memory contents from
              the up-to-date contents of the underlying mapped file (for
              shared file mappings, shared anonymous mappings, and shmem-
              based techniques such as System V shared memory segments)
              or zero-fill-on-demand pages for anonymous private
              mappings.
Does Chrome use it, though?
itopaloglu83 6 hours ago|||
Well, a few GB here and a few GB there, soon you’re talking about real RAM issues.

The other day Safari was using over 50GB with only a few tabs open.

Maybe we should also acknowledge that some companies particularly have no compassion for users (and their desires or needs) and see them as hurdles in their way to take money from users.

maccard 7 hours ago|||
I want my compiler, language server IDE, to do that not LinkedIn
general_reveal 7 hours ago|||
Um.

The websites are jam packed with trackers and ads. I am utterly concerned about Chrome’s memory usage because it’s passively allowing this all to occur.

How about you let me blacklist sites that are using too much memory automatically, all that means is that those website owners FUCKING HATE THE REST OF US.

Any solution to this epic fucking problem would be wonderful.

lucasfin000 7 hours ago|||
uBlock origin on Firefox or Brave, which will block most of the tracker bloat, causing the RAM spike. It's not a perfect fix, but it will cut out a significant chunk of it. Tab Wrangler also helps by suspending inactive tabs automatically. You should try out both.
temp0826 6 hours ago|||
Step 0- don't use a browser created by an ad company
kalleboo 6 hours ago||
I use a Mac which has really good memory management but still seeing that 10 GB of my SSD is clogged up with useless crap just because modern development systems are complete and utter crap feels bad.

March is "MARCHintosh" month for retro Macintosh computing, for fun I wrote a networked chat client. It has some creature comfort features like loading in chat history from the server, mentions, user info, background notifications, multiple session. It runs in 128 kilobytes of RAM.

Automatic garbage collection memory management was a mistake. The memory leaks we had when people forgot to free memory was nothing compares to the memory leaks we have now when people don't even consider what memory is.

system2 1 hour ago||
I think it is an accomplishment to bloat a website to a point where the user needs to download 40-100mb per page. Even if I try, I can't find the right JS files to make it that large. How do they even make JS files this big?
SlightlyLeftPad 4 hours ago|
I was searching for jobs using it a while ago and it consumed 80 percent of my iphone’s battery in under 40 minutes. It’s quite impressive. Not even highest end mobile games can do that.
More comments...