My .org file is almost 2MB large. How can I narrow down what headers/sub-headers take so much space?
2 Answers
See org-treeusage.el. It was added recently to the MELPA archive.
This library provides a minor mode for peeking at the line or character usage of each heading in an org-mode file with respect to the parent heading, allowing users with large org files to see the distribution of heading content and make informed decisions on where to prune, refile, or archive.
You can use the Python script org-du to produce line counts per section, using the same format as the du
command line tool. This can then be piped to xdu
for a graphical display.
display-line-numbers-mode
with only the headings visible, and look for a really big jump. Then expand/repeat as necessary to drill down. To check actual character counts, you may need to write some code -- more or less just checking how much(point)
changed between each heading, and maybe showing that as a proportion of(point-max)
.