Repository navigation
Bring the installed size under CRAN's 5 MB limit: xz lazy data, ragg vignette figures (#219) - #253
Merged
Merged
Conversation
…s in vignettes (#219) R CMD check reported an installed size of 6.0 MB (data 3.5 MB, doc 2.0 MB). CRAN flags packages over 5 MB. - LazyDataCompression: xz. The same PSA samples are stored three times in the lazy-load database (cancer_psa_data, and the superseded example_psa and example_psa_obj rebuilt from it at install), so the compression matters: data 3.5 -> 2.8 MB. Loaded objects identical. - Vignette figures use ragg_png (ragg in Suggests; falls back to png without it): same resolution, about 22% smaller PNGs. doc 2.0 -> 1.6 MB. Installed size 6.0 -> 4.8 MB ("checking installed package size ... OK"); tarball 2.83 -> 2.51 MB.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #219.
Problem
R CMD checkreported an installed size of 6.0 MB: data 3.5 MB and docs (built vignettes) 2.0 MB. CRAN flags packages over 5 MB. The R 4.1.3 run in #249 showed it as a NOTE, and current R reports it as INFO.The data is large because the same PSA samples are stored three times once installed:
cancer_psa_data, plus the supersededexample_psaandexample_psa_obj, which are rebuilt from it at install time. #248 stopped storing them three times in the tarball, but the installed lazy-load database still holds three copies. The two superseded datasets can only go in 2.0.Changes
LazyDataCompression: xzin DESCRIPTION. Installed data drops from 3.5 to 2.8 MB. The loaded objects areidentical()to before.ragg_png, which writes PNGs about 22% smaller at the same 672 × 480 resolution. Built docs drop from 2.0 to 1.6 MB.raggis added to Suggests.pngdevice if ragg isn't installed.checking installed package size ... OK)@evaenns, this adds one line to the setup chunk of each vignette (
dev = ...), so you'll see it when you mergemaininto your #216 work. It also leaves only about 0.2 MB of margin. If the new "Get started" vignette adds several figures, please keep an eye on its size. The two PSA scatterplots inpsa_analysisare the largest images, at about 140 KB each.Verification
devtools::test(): 345 passed, 0 failed.lintr: 0 lints.main.R CMD check --as-cran: only the development-version NOTE, and the installed size is OK.