Comprehending MELPA's size
For reasons, I grabbed the entire MELPA archive of published Emacs packages to grep against. Some questions are answerable only by inspecting existing code.
Fetching MELPA was staightforward — it’s documented in their README.
rsync --info=progress2 -avz --delete rsync://melpa.org/packages/ snapshots/
# then unpack it
mkdir x
for tarball in snapshots/*.tar; do echo -n .; tar -C x -xf "$tarball"; done; echo
A quick wordcount later:
find x -type f -name '*.el' -exec wc {} + | tail -1
yields:
909855 3647709 39331411 total
Written for humans:
- About 910k lines
- About 39 Megabytes of Elisp source
Zooming out, there’s far more data in MELPA than code:
find x -type f -exec du --human-readable {} + | sort --human-numeric-sort -r > du.txt && head du.txt
Shows only two of the top files are actually Elisp source:
| Size | Path |
|---|---|
| 53M | organize-imports-java-20260101.601/sdk/jre/lib/rt.jar |
| 18M | organize-imports-java-20260101.601/sdk/jre/lib/ext/jfxrt.jar |
| 14M | org-analyzer-20191001.1717/org-analyzer.jar |
| 11M | matlab-mode-20260208.1304/matlab-ts-mode--builtins.el |
| 9.9M | rom-party-20250627.838/index.extmap.gz |
| 8.0M | tide-20241019.2101/tsserver/tsserver.js |
| 7.7M | pyim-smzmdict-20250621.828/pyim-nmzmdict.pyim |
| 6.6M | rainbow-fart-20251212.1420/voices/千岛/AcFun-Chi-Python-Chinese/com_music_5.mp3 |
| 6.6M | rainbow-fart-20251212.1420/voices/千岛/AcFun-Chi-JavaScript-Chinese/com_music_5.mp3 |
| 5.6M | sumibi-20260104.1157/sumibi-localdic.el |
There is music in MELPA.
Who would have known.