为什么LinkedIn会使用3.5 GB的内存?
我第一次在Chrome上看到这个,决定在Safari中测试一下。结果非常相似。<p>我还将其与Facebook进行了比较,经过5分钟的故意滚动,最多消耗了650 MB,平均约为400 MB。<p>有没有网页开发者能解释一下LinkedIn和Facebook之间巨大的差异?看起来两者在信息流中的视觉信息量几乎相同,但LinkedIn的内存占用却高出5到7倍。<p>我查了一下,Facebook使用React和虚拟DOM,而LinkedIn使用Ember(我之前从未听说过这个)。难道只是因为Facebook在不再需要JavaScript对象时更有效地动态清除它们吗?
查看原文
I saw it first on Chrome, decided to test in Safari. Very similar numbers.<p>I also compared it with Facebook, with 5 minute deliberate scrolling I got it to consume 650 MB at most, with average being about 400 MB.<p>Any web developers who can explain the huge discrepancy between LinkedIn and Facebook? It seems like the amount of visual information is almost the same in the feed, yet LinkedIn takes up 5-7x more memory.<p>I looked up, Facebook uses React and the virtual DOM, whereas LinkedIn uses Ember (never heard of that one before). Is it simply that Facebook is better about dynamically kicking out JavaScript objects when they'ren no longer needed?