[R-pkg-devel] Excessive time of first example to be checked

Joshua Wiley jw||ey@p@ych @end|ng |rom gm@||@com
Mon May 23 12:04:47 CEST 2022


Hi Jean-Matthieu,

Have you timed how long it takes to load your package (or all the packages
loaded in the example)?  Most packages load quite rapidly, if yours is
taking more than 2-3 seconds, perhaps you could explore what is taking the
time?

Another thought: are there parts of the example(s) you could mark as
\dontrun{}?

Lastly, https://win-builder.r-project.org/
is a service that builds on Windows and will show notes etc. so if you
think you have it solved, you can send there and see if it passes without
notes.

Cheers,

Josh


On Mon, May 23, 2022 at 7:34 PM Jean-Matthieu Monnet <
jean-matthieu.monnet using inrae.fr> wrote:

> I was asked by CRAN to fix NOTEs in the new version of the package
> lidaRtRee
>
> On Debian
> (
> https://win-builder.r-project.org/incoming_pretest/lidaRtRee_4.0.0_20220520_163049/Debian/00check.log)
>
> I have one note related to the maintainer :
>
> # -----
> * checking CRAN incoming feasibility ... NOTE
> Maintainer: ‘Jean-Matthieu Monnet <jean-matthieu.monnet using inrae.fr>’
> # ------
>
> On Windows I also have another NOTE
> (
> https://win-builder.r-project.org/incoming_pretest/lidaRtRee_4.0.0_20220520_163049/Windows/00check.log)
>
> due to to the running time of the first example, which is my main concern.
>
> # ------
> * checking examples ... [78s] NOTE
> Examples with CPU (user + system) or elapsed time > 10s
>               user system elapsed
> aba_metrics 11.79   0.27   12.05
> # ------
>
> I do not have access to a windows machine for testing. On my machine
> (Ubuntu 20.04) the example runs in ~ 4 sec after R startup, but in less
> than 2 sec on the following calls (see details below). I am not sure if
>   the excessive running of this example (which is the first to be
> tested) is due to library loading. If it is the case, how can I fix it:
> - create a "virtual" example which purpose would be to just load
> libraries, hoping that its running time would be less that 10 sec.
> - load libraries at start up using a different way.
> - ... ?
>
> Here is a link to the package tar.gz
> (
> https://filesender.renater.fr/?s=download&token=163ca058-13ba-4cf5-8f4f-3514abd03ff8)
>
> and below the code I run on my machine to estimate the example time.
>
>
> # --------------
> # install package
> # install.packages(file.choose(), repos=NULL)
> #
> # --------------
> # running time at first call
> system.time(example(aba_metrics, package = "lidaRtRee"))
> # Le chargement a nécessité le package : lidR (loading required)
> # lidR 4.0.1 using 6 threads. Help on <gis.stackexchange.com>. Bug
> report on <github.com/r-lidar/lidR>.
> #
> # [...]
> # utilisateur     système      écoulé
> # 3.867       0.095       3.742
> #
> # --------------
> # running time at next call
> system.time(example(aba_metrics, package = "lidaRtRee"))
> #
> # [...]
> # utilisateur     système      écoulé
> # 0.182       0.000       0.082
>
> Thank you very much for your answers.
>
>
> --
> Jean-Matthieu Monnet
> UR LESSEM - INRAE Grenoble
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list