Skip to content

New lazyload rdx key type: list(eagerKey=, lazyKeys=)

1 message · Tomas Kalibera

#
On 8/31/19 12:35 AM, William Dunlap via R-devel wrote:
The new mechanism allows to load lazily selected bindings from an 
environment - previously only the bindings from the package/namespace 
environment were loaded lazily. The mechanism is currently used only for 
"lines" and "parseData" bindings of "srcfile" environments. Packages 
that include parse data will benefit from the latter and all packages 
that include source references will benefit from both. This change made 
it feasible to run package checks with source references enabled, so now 
one can get more useful error traces with execution time overhead 
reasonable for check runs.

The format of the lazy loading database is specific to R release, it can 
change at any time. Specifically this mechanism could be used for more 
environments, but I am not aware of any that would benefit at the moment.
Bindings listed in lazyKeys are treated the same way as bindings in the 
package/namespace environment, so they become promises after loading the 
environment. Those promises load the individual objects for the bindings 
when forced (details in makeLazyLoad.R and lazyLoad.R and now also 
explicitly in R-ints).

Best
Tomas