Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: r-lib/actions/setup-pandoc@v2

Expand Down
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ URL: https://hugogruson.fr/grumpy/, https://github.com/Bisaloo/grumpy
BugReports: https://github.com/Bisaloo/grumpy/issues
Imports:
jsonlite
Config/Needs/website:
Huber-group-EMBL/Rarr
Config/roxygen2/version: 8.0.0
Depends:
R (>= 4.2.0)
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ is performant, flexible. Overall, it is designed to be used deep in the
dependency graph of other packages.

For more details on the motivation and design principles underpinning
`{grumpy}`, see the dedicated vignette: .
`{grumpy}`, see the dedicated vignette:
`vignette("design", package = "grumpy")`.

## Installation

Expand Down
2 changes: 1 addition & 1 deletion README.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ As a file format generated by a Python package, `.npy` files are prime candidate
However, this comes with downsides in terms of performance, flexibility, and robustness of the R package infrastructure.
`{grumpy}`, on the other hand, is a pure R package with a single dependency (`{jsonlite}`), and is performant, flexible. Overall, it is designed to be used deep in the dependency graph of other packages.

For more details on the motivation and design principles underpinning `{grumpy}`, see the dedicated vignette: `r vignette("design", package = "grumpy")`.
For more details on the motivation and design principles underpinning `{grumpy}`, see the dedicated vignette: `vignette("design", package = "grumpy")`.

## Installation

Expand Down
9 changes: 6 additions & 3 deletions vignettes/beyond.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ size <- list.files(f_zarr, full.names = TRUE, recursive = TRUE) |>
file.info() |>
subset(select = "size") |>
sum()
size
```

**Without compression**, the equivalent Zarr data is thus 320.577 kB on disk, so `round(8e8 / size)` times smaller than the `.npy` file. We could also use compression to further reduce the size of the Zarr file on disk, but this is out of scope for this vignette.
**Without compression**, the equivalent Zarr data is thus 320 kB on disk, so `round(8e8 / size)` times smaller than the `.npy` file. We could also use compression to further reduce the size of the Zarr file on disk, but this is out of scope for this vignette.

## Decoding speed comparison

Expand All @@ -61,11 +62,13 @@ np$save(f_npy, x)
```

```{r}
bench::mark(
bm <- bench::mark(
grumpy = read_npy(f_npy),
zarr = read_zarr_array(f_zarr),
iterations = 20
iterations = 50
)
bm
summary(bm, relative = TRUE)
```

There is a small time penalty for reading the Zarr file, since the various chunks need to be read and concatenated together, but the memory footprint is much smaller, and the Zarr file is much smaller on disk. This is particularly important for large datasets that do not fit into memory, as it allows for out-of-core processing of the data.
Loading