TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Why is Atom a whopping 845 MB on my Mac?

40 点作者 PieUser超过 6 年前
That is insane for a text editor. For comparison VS Code is only 192 MB on my Mac.

10 条评论

mailslot超过 6 年前
There are many reasons. The elsephant in the room, being that it’s Javascript and includes a full blown browser with a JS VM.<p>When I write a C or C++ app, if I use libcurl and a library I’m using does as well, it links to the same shared libcurl library (mapped in RAM) as all other running processes do as well. With NPM, you can’t share libraries across process space and you’ll often even find the same packed being imported multiple times within the same app. In JS, it’s like statically linking all of your dependencies, but even less efficient. It can be argued that this is as good as it is bad.<p>When you build a code ecosystem atop JS, the underlying inefficiencies multiply as each layer is added. VS Code is more efficient, but even 192MB is still pathetically bloated.<p>Expect Atom to eventually approach and surpass 1GB of RAM, not less... at least in the short term.
评论 #18506705 未加载
评论 #18507501 未加载
phendrenad2超过 6 年前
At a high level, it&#x27;s because Atom is buult from components, and each of those components is made up of hundreds of components, and each of those is made from hundreds of components, etc. Each component is general-purpose in some way, and includes code that isn&#x27;t used by Atom. To be slightly more specific, when I pull apart components like this to figure out why they&#x27;re so large (like a 100MB XML-parsing library), the vast majority of the bulk is usually huge tables of data, such as unicode mappings. Most likely, Atom contains multiple components which contain the same data tables, but because of the hierarchical nature of modern software development, no one can cut through the layers and DRY up (denormalize?) that data.
评论 #18505874 未加载
rs23296008n1超过 6 年前
Atom is ALSO a text editor. It&#x27;s really a web browser in &quot;to go&quot; mode so it brings all its dependencies and a whole lot more along with it. I&#x27;m sure there are multiple copies of some components brought along for ride. I&#x27;ve seen this with quite a few NPM based projects. eg three copies of the same module because of dependencies in other modules.<p>Bloated for a text editor.
chuckkir超过 6 年前
It&#x27;s javascript. I think this article does a fine job explaining it: <a href="https:&#x2F;&#x2F;medium.com&#x2F;s&#x2F;silicon-satire&#x2F;i-peeked-into-my-node-modules-directory-and-you-wont-believe-what-happened-next-b89f63d21558" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;s&#x2F;silicon-satire&#x2F;i-peeked-into-my-node-mo...</a>
评论 #18506293 未加载
Jyaif超过 6 年前
I can&#x27;t tell if it&#x27;s 845 MB of RAM, or disk space. In any case, the answer is that it costs less to create a bloated app.
mikestew超过 6 年前
I&#x27;m not in front of a Mac right now, nor do I use Atom on said Mac, but you can right-click on atom.app&#x2F;Show Contents and get a directory layout of what&#x27;s in there. It won&#x27;t break out the binary and statically compiled libraries, but you can see if it&#x27;s using large assets, or dragging along bunch of dynamic libs.
miga超过 6 年前
Ubuntu snap of Atom 206 is 178M squashfs, which uncompresses to 1.1GB. I suppose that most of &#x2F;Application&#x2F;Atom is uncompressed data.<p>Snaps are similar to Mac packages, since they bundle most of the libraries together with them.
choot超过 6 年前
Just because something is named atom doesn&#x27;t mean it&#x27;s small.<p>It&#x27;s a clever marketing.<p>Downvotes for pointing out the flaw in marketing vs reality.
db48x超过 6 年前
Use objdump (or whatever the OSX equivalent is) and find out.
wilsonnb3超过 6 年前
The real answer is because 845MB isn’t a lot of disk space or ram anymore.
评论 #18506101 未加载
评论 #18505946 未加载