Why is Atom.app (on macOS) HUGE?


#1

I just copied Atom.app (1.29.0 x64) over from my 8GB RAM i7 iMac to my 32GB RAM 6-core Xeon MacPro, which only has an SSD, because the app was so slow and my 8GB RAM iMac continually runs out of memory, and I noticed that this app is 559.4 MB! This is just in the app itself, not including anything it might be storing in Application Support (checking: only 16MB).

What can I trim out of this huge app to lighten it up? Of course, it started up orders of magnitude faster on the MacPro, but this much of my SSD taken up by an editor?? I do have other things I plan on using the MacPro for. I didn’t get it just so it could run a Markdown and JavaScript editor as fast as it should run anyway.


#2

Atom is not known for being small. Try vim, emacs, or nano if this is an issue.

As for why, it’s built on electron which is built on chromium. Chrome itself is ~375 MB, and electron also use NodeJS.


#3

Since Electron and Node are – in layman’s terms – built on top of Chromium, they already inherit a lot from there (for comparison, my Chrome browser is ~370MB). The biggest part of Atom are app.asar (the huge red block in the image below) and the Electron Framework (the green block). I’m not sure why Atom needs/keeps both, app.asar and app.asar.unpacked, judging by the name they are the same.

100 biggest items in Atom.app
$ find /Applications/Atom.app -type f -print0 | xargs -0 ls -la | awk '{print int($5/1000) " KB\t" $9}' | sort -n -r -k1
|254025 KB|./Resources/app.asar|
|---|---|
|76484 KB|./Frameworks/Electron|
|55787 KB|./Frameworks/Electron|
|30482 KB|./Resources/app/apm/bin/node|
|24096 KB|./Resources/app/apm/.tags|
|17901 KB|./Frameworks/Electron|
|10197 KB|./Frameworks/Electron|
|8675 KB|./Frameworks/Electron|
|8563 KB|./Resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-lfs|
|4605 KB|./Resources/app/apm/node_modules/git-utils/build/Release/git2.a|
|2981 KB|./Resources/app.asar.unpacked/node_modules/tree-sitter-typescript/build/Release/tree_sitter_typescript_binding.node|
|2819 KB|./Frameworks/Electron|
|2249 KB|./Resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git|
|2249 KB|./Resources/app.asar.unpacked/node_modules/dugite/git/bin/git|
|2035 KB|./Resources/app.asar.unpacked/node_modules/tree-sitter-cpp/build/Release/tree_sitter_cpp_binding.node|
|1643 KB|./_CodeSignature/CodeResources|
|1324 KB|./Resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-remote-http|
|1320 KB|./Resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-imap-send|
|1320 KB|./Resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-http-push|
|1311 KB|./Resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-http-fetch|
|1308 KB|./Resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-fast-import|
|1280 KB|./Resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-daemon|
|1276 KB|./Resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-credential-cache--daemon|
|1275 KB|./Resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-http-backend|
|1272 KB|./Resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-credential-store|
|1267 KB|./Resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-show-index|
|1267 KB|./Resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-shell|
|1267 KB|./Resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-sh-i18n--envsubst|
|1267 KB|./Resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-credential-cache|
|1199 KB|./Resources/app.asar.unpacked/node_modules/git-utils/build/Release/git.node|
|1197 KB|./Resources/atom.icns|
|1112 KB|./Resources/app/apm/node_modules/git-utils/build/Release/git.node|
|1066 KB|./Resources/app/apm/node_modules/oniguruma/build/Release/oniguruma.a|
|1000 KB|./Resources/LICENSE.md|
|979 KB|./Resources/app/apm/node_modules/ajv/dist/regenerator.min.js|
|949 KB|./Resources/app.asar.unpacked/node_modules/superstring/build/Release/superstring.node|
|935 KB|./Resources/app.asar.unpacked/node_modules/tree-sitter-bash/build/Release/tree_sitter_bash_binding.node|
|902 KB|./Resources/app.asar.unpacked/node_modules/tree-sitter-python/build/Release/tree_sitter_python_binding.node|
|888 KB|./Frameworks/ReactiveCocoa.framework/Versions/A/ReactiveCocoa|
|884 KB|./Resources/app.asar.unpacked/node_modules/tree-sitter-javascript/build/Release/tree_sitter_javascript_binding.node|
|877 KB|./Resources/app.asar.unpacked/node_modules/spellchecker/build/Release/hunspell.a|
|743 KB|./Frameworks/Squirrel.framework/Versions/A/Resources/ShipIt|
|678 KB|./Resources/app.asar.unpacked/node_modules/tree-sitter-go/build/Release/tree_sitter_go_binding.node|
|661 KB|./Resources/app.asar.unpacked/node_modules/tree-sitter-c/build/Release/tree_sitter_c_binding.node|
|599 KB|./Frameworks/Electron|
|568 KB|./Resources/file.icns|
|493 KB|./Resources/app.asar.unpacked/node_modules/tree-sitter/build/Release/tree_sitter_runtime_binding.node|
|461 KB|./Resources/app.asar.unpacked/node_modules/@atom/watcher/build/Release/watcher.node|
|423 KB|./Resources/app/apm/node_modules/oniguruma/build/Release/onig_scanner.node|
|422 KB|./Resources/app.asar.unpacked/node_modules/oniguruma/build/Release/onig_scanner.node|
|393 KB|./Resources/app.asar.unpacked/node_modules/spellchecker/build/Release/spellchecker.node|
|365 KB|./Resources/app.asar.unpacked/resources/atom.png|
|315 KB|./Resources/app.asar.unpacked/node_modules/symbols-view/vendor/ctags-win32.exe|
|272 KB|./Resources/electron.icns|
|260 KB|./Resources/app/apm/node_modules/ajv/dist/ajv.bundle.js|
|260 KB|./Frameworks/Squirrel.framework/Versions/A/Squirrel|
|258 KB|./Resources/electron.asar|
|250 KB|./Resources/app.asar.unpacked/node_modules/symbols-view/vendor/ctags-linux|
|242 KB|./Resources/app/apm/node_modules/first-mate/benchmark/large.js|
|237 KB|./Resources/app.asar.unpacked/node_modules/symbols-view/vendor/ctags-darwin|
|228 KB|./Resources/app/apm/node_modules/ajv/dist/nodent.min.js|
|221 KB|./Frameworks/Electron|
|184 KB|./Resources/app/apm/node_modules/es5-ext/string/#/normalize/_data.js|
|169 KB|./Resources/app/apm/tags|
|166 KB|./Frameworks/Mantle.framework/Versions/A/Mantle|
|164 KB|./Frameworks/Electron|
|163 KB|./Resources/app/apm/node_modules/tough-cookie/lib/pubsuffix.js|
|162 KB|./Resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified|
|162 KB|./Resources/app/apm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified|
|153 KB|./Resources/app/apm/node_modules/mime-db/db.json|
|149 KB|./Resources/app/apm/node_modules/npm/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js|
|146 KB|./Resources/app/apm/node_modules/git-utils/build/Release/zlib.a|
|145 KB|./Resources/app/apm/node_modules/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json|
|131 KB|./Resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py|
|131 KB|./Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py|
|130 KB|./Resources/app/apm/node_modules/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/string/#/normalize/_data.js|
|129 KB|./Resources/app/apm/node_modules/season/node_modules/coffee-script/lib/coffee-script/nodes.js|
|121 KB|./Resources/app/apm/node_modules/first-mate/benchmark/bootstrap.css|
|120 KB|./Resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py|
|120 KB|./Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py|
|116 KB|./Resources/app/apm/node_modules/ajv/dist/ajv.min.js|
|115 KB|./Resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py|
|115 KB|./Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/input.py|
|107 KB|./Resources/app/apm/node_modules/season/node_modules/coffee-script/lib/coffee-script/parser.js|
|106 KB|./Resources/app/apm/node_modules/coffee-script/lib/coffee-script/nodes.js|
|100 KB|./Resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py|
|100 KB|./Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py|
|99 KB|./Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.pyc|
|99 KB|./Resources/app/apm/node_modules/first-mate/benchmark/bootstrap.min.css|
|91 KB|./Resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py|
|91 KB|./Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py|
|84 KB|./Resources/app.asar.unpacked/node_modules/@atom/nsfw/build/Release/nsfw.node|
|83 KB|./Resources/app/apm/node_modules/first-mate/benchmark/large.min.js|
|75 KB|./Resources/app/apm/node_modules/coffee-script/lib/coffee-script/parser.js|
|71 KB|./Resources/app/apm/node_modules/npm/node_modules/request/node_modules/hawk/images/logo.png|
|71 KB|./Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.pyc|
|70 KB|./Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.pyc|
|66 KB|./Resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/input.pyc|
|65 KB|./Resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py|
|65 KB|./Resources/app/apm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py| 
```

The Atom.app package as visualized by Grand Perspective:


#4

Thanks for the informative replies. When I need to save some space I’ll know where to go. Meanwhile at least Atom will be snappy on the new computer.