DyfanJones / RAthena

Connect R to Athena using Boto3 SDK (DBI Interface)
https://dyfanjones.github.io/RAthena/
Other
35 stars 6 forks source link

reticulate enhancements #94

Open DyfanJones opened 4 years ago

DyfanJones commented 4 years ago

Make sure RAthena takes full advantage of the new changes to reticulate:

https://blog.rstudio.com/2019/12/20/reticulate-1-14/

DyfanJones commented 4 years ago

When adding python dependency in the description file:

Config/reticulate:
  list(
    packages = list(
      list(package = c("boto3", "numpy", "cython"), pip = TRUE)
    )
  )

The package runs x3 slower in setting up even if the python environment is already built.

library(DBI)
system.time(con <- dbConnect(RAthena::athena()))

With python dependency: 7.602 s

Without python dependency: 2.813 s

This is down to the package checking the environment is configured before loading.