Skip to content
This repository was archived by the owner on Nov 21, 2020. It is now read-only.
This repository was archived by the owner on Nov 21, 2020. It is now read-only.

Rprocess->write takes too much time #14

@jesusvazquez

Description

@jesusvazquez

Hi,

I'm trying to perform something with your repo. I found it really easy to use. Something weird is happening to me.
I have this php class with a structure like this:

$r = new RCore(new CommandLineREngine('/usr/bin/R'));
$rProcess = $r->createInteractiveProcess();
$rProcess->start();
$rProcess->write(<<<EOF
//////// BIG SCRIPT
EOF
);

$rProcess->write(<<<EOF
///////// GET SOME VARIABLE VALUE
EOF
);

$result = $rProcess->getLastWriteOutput();
$rProcess->stop();
return $result;

If I execute this once it rans in 24 seconds but if i reload the page if takes infinity. I updated my webserver timeout to 1 minut and I just get a timeout...

I don't understand why this is happening. The script rans in 1 second in Rstudio and it takes too much with php and this repo... what am i missing? Is this a repo problem? or is it my fault?

Best Regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions