sglyon / ORCA.jl

Julia interface to Plotly's ORCA image exporter app
3 stars 5 forks source link

reason for taking the "orca server" approach #19

Closed asbisen closed 4 years ago

asbisen commented 5 years ago

Wondering if there was a specific reason for using orca server approach vs the orca graph single time instantiation for generating png/svg. I think calling orca graph is cleaner as there is no residual server running after the graphs have been converted to png/svg.

I am also encountering another issue with docker container (headless) I have to instantiate orca server with xvfb-run prefix which works fine if that's the only julia code using ORCA. With multiple instances of ORCA other instances are failing when they try to instantiate another xvfb session.

sglyon commented 5 years ago

Hey @asbisen this was done for performance reasons.

Time to save a chart falls dramatically if the server is already running.

When using orca graph a Nodejs process needs to be started up before any plotly work can be done, which takes a non-trivial amount of time.

I see that forcing server usage might be undesirable. Would a solution that uses environment variables to determine if ORCA.jl should operate in server or graph mode be appropriate for your use case?

asbisen commented 5 years ago

@sglyon sure env variable should be good. So something like this?

ENV['ORCA_SERVER']=0 
using ORCA

I understand that for use case where savefig is called a lot these 4s would add up pretty quickly. For my needs it's cleaner because I only call savefig a few times and can avoid Xvfb collisions inside a docker container.

sglyon commented 5 years ago

Yeah that makes a lot of sense -- we should definitely support both use cases

I think I'd prefer the default to be server mode, but that we should document very clearly that settingORCAJL_NO_SERVER will put you into orca graph mode

Does that sound good to you?

asbisen commented 5 years ago

Yup. That sounds like a good plan.

sglyon commented 5 years ago

Sounds good, I'll try to work on this later this week.

sglyon commented 4 years ago

Thanks @asbisen for your work here and in the associated pull request.

Due to the problems with this package, we have decided to go another direction. The savefig functionality offered by this package has been superseded by new routines built in to PlotlyBase.jl (and thus PlotlyJS.jl) itself.

ORCA.jl is now deprecated and should not be used going forward.

Thank you