callr icon indicating copy to clipboard operation
callr copied to clipboard

Add poc mmap data sharing

Open gaborcsardi opened this issue 5 years ago • 1 comments

Unix only. Uses https://github.com/r-lib/processx/pull/201

This is really a crude poc now. Notes:

  • callr::r supports the transter = "mmap" option now, to transfer all arguments via shared memory.
  • it fails if one argument is not an integer, real, raw or logical vector.
  • it changes how the subprocess runs its R code: it puts a run() function into a callr environment on the search path. This allows more flexible subprocess code.
  • the result is still copied back via a file.
  • it needs a better way of passing the fd of the memory mapped file. Right now it just assumes 3L, but that might change depending on whether we have a poll connection or not, or possibly other connections.

gaborcsardi avatar Jun 10 '19 10:06 gaborcsardi

Codecov Report

Merging #109 into master will increase coverage by 10.09%. The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #109       +/-   ##
===========================================
+ Coverage   74.39%   84.48%   +10.09%     
===========================================
  Files          20       20               
  Lines        1070      986       -84     
===========================================
+ Hits          796      833       +37     
+ Misses        274      153      -121
Impacted Files Coverage Δ
R/package.R 0% <ø> (ø) :arrow_up:
R/eval-bg.R 100% <ø> (ø) :arrow_up:
R/eval.R 100% <ø> (ø) :arrow_up:
R/check.R 100% <100%> (ø) :arrow_up:
R/run.R 100% <100%> (ø) :arrow_up:
R/r-session.R 74.14% <100%> (+16.51%) :arrow_up:
R/setup.R 93.28% <100%> (-2.69%) :arrow_down:
R/script.R 96.2% <100%> (+6.66%) :arrow_up:
R/options.R 100% <100%> (ø) :arrow_up:
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e8b86fe...8fb3a04. Read the comment docs.

codecov-io avatar Jun 28 '19 12:06 codecov-io