Message-ID: <b8b1fd83-91c0-c7d7-7d9c-f00dc7ad1122@gmail.com>
Date: 2020-10-27T15:29:11Z
From: Ben Bolker
Subject: [R-pkg-devel] Run-times of examples in vignettes
In-Reply-To: <0c9d9af1-e3f9-844e-3d95-2e7be29c300d@bebac.at>
My general solution is to run time-consuming computations in advance
and store the results in (e.g.) inst/vignette_data, whence they can be
retrieved via system.file("vignette_data", "output.rda",
package="my_pkg"). (I might also include the R script required to
generate the file so that I could automatically re-make those outputs as
required ...)
On 10/27/20 8:53 AM, Helmut Sch?tz wrote:
> Hi Dirk,
>
> Dirk Eddelbuettel wrote on 2020-10-27 13:32:
>> | is there somewhere an official statement about the maximum run-times of
>> | examples in vignettes?
>>
>> Seven minutes is excessive.
>
> Sure. The one vignette contains simulation code which needs 1E5 to 1E6
> sims to get a stable result. Fewer sims are simply not meaningful.
> Since we use a pre-complied vignette now the execution time is
> essentially zero.
> The others take 45 seconds in total.
> If we would pre-compile the second slowest as well, we would be down for
> the remaining four at 12 seconds.
>
>> I have (long) gone by the rule of "about one minute" each for tests
>> and examples.
>
> OK. Do you know of any reference for this "rule"?
>
> Helmut
>