Thanks I checked system.time(example(get.geotop.inpts.keyword.value)) . Elapsed time varies on my machines between 6 and 3 seconds (see below) , mostly lesser than 5 seconds. It extracts information from a set-up directory of the GEOtop model. I cannot put an GEOtop simulation folder within "geotopbricks" package for obvious reasons and function example refers to example GEOtop simulation folder available on an external ad hoc Github repository. I'm looking for a solution. Thanks for suggestions.
Best Emanuele user system elapsed 2.991 0.024 5.532 > > > system.time(example(get.geotop.inpts.keyword.value)) user system elapsed 2.846 0.001 3.796 > Il giorno lun 14 apr 2025 alle ore 13:34 Ivan Krylov <ikry...@disroot.org> ha scritto: > В Mon, 14 Apr 2025 08:53:38 +0200 > Emanuele Cordano <emanuele.cord...@gmail.com> пишет: > > > CRAN check were OK (frorr Windows) whereas in Debian a function > > example elapses 5.326 seconds. I need to fix this. Most lines in > > the examples are within \donttest{} brackets, so they should not be > > executed by CRAN checks. > > Nowadays, R CMD check --as-cran does run \donttest{} examples. (But not > without --as-cran or --run-donttest, and no automatic checks enable > --run-dontrun.) > > > Examples with CPU (user + system) or elapsed time > 5s > > user system elapsed > > get.geotop.inpts.keyword.value 1.406 0.027 5.326 > > It looks like most of the time was spent waiting to establish a new > connection (closer to 8 seconds on my computer). What does > system.time(example(get.geotop.inpts.keyword.value)) return for you? Is > it an option to download less files in the example? > > Having examples that download data from the internet is somewhat > precarious for a CRAN package. One way to prevent intermittent > connectivity problems from failing your package checks is to make sure > that any time your package fails to download something from the Web, it > calls stop() with a classed error object (e.g. simpleError(...) with an > additional class "geotop_internet_error" attached). This makes it > possible to wrap your examples in tryCatch(..., geotop_internet_error = > function(e) { ... }), so that any connection errors do not cause your > examples to fail, but other errors are not swallowed. > > -- > Best regards, > Ivan > -- Emanuele Cordano, PhD Environmental Engineer / Ingegnere per l' Ambiente e il territorio nr. 3587 (Albo A - Provincia di Trento) cell: +39 3282818564 email: emanuele.cord...@gmail.com,emanuele.cord...@rendena100.eu, emanuele.cord...@eurac.edu PEC: emanuele.cord...@ingpec.eu URL: www.rendena100.eu LinkedIn: https://www.linkedin.com/in/emanuele-cordano-31995333 GitHub: https://github.com/ecor [[alternative HTML version deleted]] ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel