etiennebacher / altdoc

Alternative to pkgdown to document R packages
https://altdoc.etiennebacher.com
Other
65 stars 9 forks source link

Read `freeze.rds` only once #204

Closed etiennebacher closed 9 months ago

etiennebacher commented 9 months ago

Currently when we set freeze = TRUE, we read altdoc/freeze.rds every time for each man page / vignette. It would be more efficient to read it once and then check each man/vignette against their hash. That would probably make a diff in polars where there are 500+ man pages

etiennebacher commented 9 months ago

This could also be the cause of some random errors when parallel = TRUE, like here: https://github.com/pola-rs/r-polars/actions/runs/7134346227/job/19428946400?pr=540#step:10:258

If several processes in parallel try to read the RDS file at the same time, then it might error (just guessing here), so reading it only once and passing the hashes to each render_one_man() might circumvent this