GenericMappingTools / GenericMappingTools/gmt

Reduce the sizes of the repository and release tarballs

Open
#2,681 10 comments 0 reactions 0 assignees View on GitHub
longterm
Dominant language
C
Stars
979
Forks
414
Avg merge
17h 26m
Merged PRs (30d)
54

Description

The GMT repository is getting bigger. The current size is ~1 GB, and the largest directories are:

- `.git`: ~720 MB. It contains the whole git history. We can't reduce the size unless we rewrite the git history.
- `test`: ~113 MB. There are many large PS files (>1 MB) and may be reduced to smaller sizes.
- `doc`: ~70 MB. Files in the `fig` directory can be optimized to smaller sizes.
- `share`: 14 MB. Nothing we can do to this directory.
- `src`: 15 MB. Nothing to do.

The release tarball doesn't ship the GMT tests, and its size is ~150 MB after uncompression.

- `doc`: ~70MB
- `doc_release`: 50 MB

Below are what we can do to reduce the repository size and tarball size:

- [ ] Some PS files are large because they use high-resolution GSHHG or earth relief files. For example, `test/genper/east_map_0.ps` is used to test a map projection (maybe I'm wrong), but it plots all coastlines, rivers and national boundaries, and the PS figure size is ~5 MB. We may use lower-resolution data to highly reduce their sizes.
- [x] Optimize the images in the `fig` directory.
- [X] Optimize images in the `doc/rst/source/users_contrib_symbols` directory
- [x] Reduce size of images before deploying to gh-pages branch.
- [x] The `doc_release` contains the HTML documentation and hundreds of images. These images can be optimized to much smaller sizes. These images are generated when building documentation, so we need to do the image optimization before each release.

Contributor guide

Open the contributing guide

Research direction

Start with the unchecked large PostScript test artifact test/genper/east_map_0.ps and compare it with the lower-resolution-data idea in the issue. Check how the test files and release tarballs are generated, then verify that reducing the remaining large files preserves the tests and lowers repository or tarball sizes.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, documentation, release
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.