{"action":"created","issue":{"url":"https://api.github.com/repos/atom/atom/issues/9755","labels_url":"https://api.github.com/repos/atom/atom/issues/9755/labels{/name}","comments_url":"https://api.github.com/repos/atom/atom/issues/9755/comments","events_url":"https://api.github.com/repos/atom/atom/issues/9755/events","html_url":"https://github.com/atom/atom/issues/9755","id":118323186,"number":9755,"title":"atom as an editor is too big ? heavy ? large (fat) ?: the latest atom-amd64.deb package is 68MB, install size 208M","user":{"login":"crquan","id":45689,"avatar_url":"https://avatars.githubusercontent.com/u/45689?v=3","gravatar_id":"","url":"https://api.github.com/users/crquan","html_url":"https://github.com/crquan","followers_url":"https://api.github.com/users/crquan/followers","following_url":"https://api.github.com/users/crquan/following{/other_user}","gists_url":"https://api.github.com/users/crquan/gists{/gist_id}","starred_url":"https://api.github.com/users/crquan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crquan/subscriptions","organizations_url":"https://api.github.com/users/crquan/orgs","repos_url":"https://api.github.com/users/crquan/repos","events_url":"https://api.github.com/users/crquan/events{/privacy}","received_events_url":"https://api.github.com/users/crquan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-23T05:42:59Z","updated_at":"2015-11-24T16:40:22Z","closed_at":null,"body":"compare to sublime 3 is 7.2MB\r\n\r\n```console\r\nmint@gnome3-on-mac:~$ (cd Downloads/; ls -lh atom* sublime* )\r\n-rw-r--r-- 1 mint users  68M Nov 19 13:45 atom-amd64.deb\r\n-rw-r--r-- 1 mint users 7.2M Mar 26  2015 sublime_text_3_build_3083_x64.tar.bz2\r\n```\r\n\r\ninstall size: atom is 208M vs. sublime3 is 17M\r\n```console\r\n$ (cd Downloads/; dpkg-deb --fsys-tarfile atom-amd64.deb ) |tar -xvv ./usr/share/atom/\r\ndrwxr-xr-x root/root         0 2015-11-19 13:44 ./usr/share/atom/\r\n-rw-r--r-- root/root    410849 2015-11-19 13:44 ./usr/share/atom/natives_blob.bin\r\n-rw-r--r-- root/root    587068 2015-11-19 13:44 ./usr/share/atom/snapshot_blob.bin\r\n-rw-r--r-- root/root  10206624 2015-11-19 13:44 ./usr/share/atom/icudtl.dat\r\n-rw-r--r-- root/root      1055 2015-11-19 13:44 ./usr/share/atom/LICENSE\r\n-rw-r--r-- root/root    520152 2015-11-19 13:44 ./usr/share/atom/libgcrypt.so.11\r\n-rwxr-xr-x root/root  59086736 2015-11-19 13:44 ./usr/share/atom/atom\r\n-rw-r--r-- root/root         7 2015-11-19 13:44 ./usr/share/atom/version\r\n[...]\r\nmint@gnome3-on-mac:~$ \\du -xsh ./usr/share/atom/\r\n208M\t./usr/share/atom/\r\nmint@gnome3-on-mac:~$ \\du -xsh ./opt/sublime_text_3/\r\n17M\t./opt/sublime_text_3/\r\n```\r\n\r\nrun like:\r\n\r\n```console\r\nmint@gnome3-on-mac:~$ ./usr/share/atom/atom\r\nApp load time: 299ms\r\n```\r\n\r\nI'm trying to understand why it's so large: it seems a nodejs project / embedding a nodejs v0.10.40 binaries, and suffering the same nodejs project's recursive node_modules problem,\r\n\r\n```console\r\nmint@gnome3-on-mac:~$ \\du -xa ./usr/share/atom |sort -n\r\n[...]\r\n3748\t./usr/share/atom/resources/app/apm/node_modules/npm/node_modules/request\r\n4244\t./usr/share/atom/resources/app.asar.unpacked/node_modules\r\n4284\t./usr/share/atom/resources/app/apm/node_modules/first-mate\r\n4884\t./usr/share/atom/resources/app.asar.unpacked\r\n5864\t./usr/share/atom/chromedriver/chromedriver\r\n5872\t./usr/share/atom/chromedriver\r\n8540\t./usr/share/atom/content_shell.pak\r\n9968\t./usr/share/atom/icudtl.dat\r\n10784\t./usr/share/atom/resources/app/apm/node_modules/npm/node_modules\r\n11184\t./usr/share/atom/resources/app/apm/bin/node\r\n11196\t./usr/share/atom/resources/app/apm/bin\r\n11796\t./usr/share/atom/resources/app/apm/node_modules/npm\r\n16384\t./usr/share/atom/libnode.so\r\n21744\t./usr/share/atom/resources/app/apm/node_modules\r\n33516\t./usr/share/atom/resources/app/apm\r\n33524\t./usr/share/atom/resources/app\r\n57704\t./usr/share/atom/atom\r\n73464\t./usr/share/atom/resources/app.asar\r\n112480\t./usr/share/atom/resources\r\n212484\t./usr/share/atom\r\nmint@gnome3-on-mac:~$ ls -lh ./usr/share/atom/resources/app.asar\r\n-rw-r--r-- 1 mint users 72M Nov 19 13:44 ./usr/share/atom/resources/app.asar\r\nmint@gnome3-on-mac:~$ \\du -xsh ./usr/share/atom/resources/app.asar [...]\r\n72M\t./usr/share/atom/resources/app.asar\r\n33M\t./usr/share/atom/resources/app/apm\r\n22M\t./usr/share/atom/resources/app/apm/node_modules\r\n16M\t./usr/share/atom/libnode.so\r\n12M\t./usr/share/atom/resources/app/apm/node_modules/npm\r\n11M\t./usr/share/atom/resources/app/apm/bin/node\r\n11M\t./usr/share/atom/resources/app/apm/node_modules/npm/node_modules\r\nmint@gnome3-on-mac:~$ ./usr/share/atom/resources/app/apm/bin/node -v\r\nv0.10.40\r\nmint@gnome3-on-mac:~$ find ./usr/share/atom -name node_modules |wc -l\r\n90\r\nmint@gnome3-on-mac:~$ find ./usr/share/atom -name node_modules -exec ls -1 {} \\; |wc -l\r\n277\r\nmint@gnome3-on-mac:~$ find ./usr/share/atom -name node_modules -exec ls -1 {} \\; |sort -u |wc -l\r\n223\r\n```\r\n\r\nThe largest ones are app.asar (72M), apm (33M), and node binaries (16M+11M), and there are 90 node_modules directories totally, from 277 to unique 223 package names means a lot of potential duplicate code,\r\n\r\nThe app.asar (72M) resource file seems to be a large plain text file with 16 bytes binary header, is that a webpack or something I don't understand, look like a plain text javascript file, why it needs to be 72MB large? why not try some xz or gzip compressed resource?\r\n\r\n```console\r\nmint@gnome3-on-mac:~$ file ./usr/share/atom/resources/app.asar\r\n./usr/share/atom/resources/app.asar: data\r\nmint@gnome3-on-mac:~$ hexdump -C ./usr/share/atom/resources/app.asar |& head -n40\r\n00000000  04 00 00 00 b0 08 0b 00  ac 08 0b 00 a5 08 0b 00  |................|\r\n00000010  7b 22 66 69 6c 65 73 22  3a 7b 22 64 6f 74 2d 61  |{\"files\":{\"dot-a|\r\n00000020  74 6f 6d 22 3a 7b 22 66  69 6c 65 73 22 3a 7b 22  |tom\":{\"files\":{\"|\r\n00000030  2e 67 69 74 69 67 6e 6f  72 65 22 3a 7b 22 73 69  |.gitignore\":{\"si|\r\n00000040  7a 65 22 3a 34 31 2c 22  6f 66 66 73 65 74 22 3a  |ze\":41,\"offset\":|\r\n00000050  22 30 22 7d 2c 22 69 6e  69 74 2e 63 6f 66 66 65  |\"0\"},\"init.coffe|\r\n00000060  65 22 3a 7b 22 73 69 7a  65 22 3a 33 38 36 2c 22  |e\":{\"size\":386,\"|\r\n00000070  6f 66 66 73 65 74 22 3a  22 34 31 22 7d 2c 22 6b  |offset\":\"41\"},\"k|\r\n00000080  65 79 6d 61 70 2e 63 73  6f 6e 22 3a 7b 22 73 69  |eymap.cson\":{\"si|\r\n00000090  7a 65 22 3a 31 30 30 34  2c 22 6f 66 66 73 65 74  |ze\":1004,\"offset|\r\n000000a0  22 3a 22 34 32 37 22 7d  2c 22 70 61 63 6b 61 67  |\":\"427\"},\"packag|\r\n000000b0  65 73 22 3a 7b 22 66 69  6c 65 73 22 3a 7b 22 52  |es\":{\"files\":{\"R|\r\n000000c0  45 41 44 4d 45 2e 6d 64  22 3a 7b 22 73 69 7a 65  |EADME.md\":{\"size|\r\n[...]\r\nmint@gnome3-on-mac:~$ tail -c +17 ./usr/share/atom/resources/app.asar | less\r\n{\"files\":{\"dot-atom\":{\"files\":{\".gitignore\":{\"size\":41,\"offset\":\"0\"},\"init.coffee\":{\"size\":386,\"offset\":\"41\"},\"keymap.cson\":{\"size\":1004,\"offset\":\"427\"},\"packages\":{\"files\":{\"README.md\":{\"size\":60,\"offset\":\"1431\"}}},\"snippets.cson\":{\"size\":698,\"offset\":\"1491\"},\"styles.less\":{\"size\":762,\"offset\":\"2189\"}}},\"exports\":{\"files\":{\"atom.js\":{\"size\":1642,\"offset\":\"2951\"}}},\"less-compile-cache\":{\"files\":{\"008ee39f25f61883969b7638fa1eee8c89057781\":{\"files\":{\"content\":{\"files\":{\"03fe3eda02e330109d9471f0f9bb8033fc5284ea\":{\"files\":{\"package-card.json\":{\"size\":7316,\"offset\":\"4593\"},\"package-readme.json\":{\"size\":2464,\"offset\":\"11909\"},\"settings-view.json\":{\"size\":17570,\"offset\":\"14373\"},\"variables.json\":{\"size\":286,\"offset\":\"31943\"}}},\"0ca72fa78b0f02602636d1eea2ee52e59c89b9ba\":{\"files\":{\"find-and-replace.json\":{\"size\":7516,\"offset\":\"32229\"}}},\"10da4fc591498d7e0cc359330a4c634853928cc9\":{\"files\":{\"incompatible-packages.json\":{\"size\":1442,\"offset\":\"39745\"}}},\"235ea17d31c14d2abdb70d798d0a0a2c444344c9\":{\"files\":{\"encoding-selector.json\":{\"size\":725,\"offset\":\"41187\"}}},\"38c4d79a3870966993e7817b7331827c4ff9d8f7\":{\"files\":{\"index.json\":{\"size\":5280,\"offset\":\"41912\"}}},\"3cf8cf26996687e169a7146b88246c1b913a6656\":{\"files\":{\"tree-view.json\":{\"size\":1951,\"offset\":\"47192\"}}},\r\n[...]\r\n```\r\n\r\nCould you atom developers try to reduce the size ? is there any one making effort on any node dedupe solution? if can't compare with sublime, anyway keep install size below 100M or even smaller would be much appreciated; thanks"},"comment":{"url":"https://api.github.com/repos/atom/atom/issues/comments/159330555","html_url":"https://github.com/atom/atom/issues/9755#issuecomment-159330555","issue_url":"https://api.github.com/repos/atom/atom/issues/9755","id":159330555,"user":{"login":"lee-dohm","id":1038121,"avatar_url":"https://avatars.githubusercontent.com/u/1038121?v=3","gravatar_id":"","url":"https://api.github.com/users/lee-dohm","html_url":"https://github.com/lee-dohm","followers_url":"https://api.github.com/users/lee-dohm/followers","following_url":"https://api.github.com/users/lee-dohm/following{/other_user}","gists_url":"https://api.github.com/users/lee-dohm/gists{/gist_id}","starred_url":"https://api.github.com/users/lee-dohm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lee-dohm/subscriptions","organizations_url":"https://api.github.com/users/lee-dohm/orgs","repos_url":"https://api.github.com/users/lee-dohm/repos","events_url":"https://api.github.com/users/lee-dohm/events{/privacy}","received_events_url":"https://api.github.com/users/lee-dohm/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T16:40:22Z","updated_at":"2015-11-24T16:40:22Z","body":"Atom has been reduced in size significantly in the past (#6313, #6407, #6395, #6447, atom/notifications#54, among others). As a matter of fact, the `app.asar` that you mention compressing *is* a compressed file. (See the [atom/asar repository](https://github.com/atom/asar) for more information on the file format.)\r\n\r\nIf you have examples of duplicate code or specific suggestions of methods for shrinking the size of Atom, please open Issues or Pull Requests with that information. Unfortunately, I fear that simply \"make it smaller\" is not specific enough to be actionable."}}