[R-pkg-devel] First response time of the function is worse than following ones

Roman Storchak roman.storchak at gmail.com
Tue Dec 1 17:16:00 CET 2015

I am trying to create my first package that should be used with an OpenCPU

This package requires 2 things:
     -    to load multiple multiple objects to RAM/ Done by onLoad function.

   - It depends on 3  libraries that are loaded by "Imports: data.table,
   gbm, stringdist" in DESCRIPTION file. ( and lazyload is False)

My package and its dependencies are listed in preload section  in the

Technically, everything works as expected, but:
When I load package first time system.time(myfunc(input)) is substantially
higher then all following timings.  I don’t understand why it happens.  All
dependencies are preloaded, all objects are loaded in to RAM.

On the higher scale - same (unknown to me) reason prevents package achieve
desired response delay while being used through an OpenCPU.

I can't understand why it is happening. Which way should I elaborate on the

Роман Сторчак, PhD
Телефон: 093.713.55.25

	[[alternative HTML version deleted]]

More information about the R-package-devel mailing list