How to effectively use crew::crew_controller_local? #19
-
Goal Questions |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes, in Shiny, each user gets their own R session. So if the This may sound like an open door perhaps, but you might also want to consider reducing the plot rendering time and move computations out of the plot elsewhere and send that to a worker. Most of the time plot rendering takes long because there's a lot of data behind it, but the amount of detail is not always necessary for the plot itself. Depends on your specific situation of course 😄. Also, I don't know anything about the scale of your app, but be aware that for a high number of concurrent users, allocating a separate worker per user may strain server resources! |
Beta Was this translation helpful? Give feedback.
Hi @udurraniAtPresage,
Yes, in Shiny, each user gets their own R session. So if the
crew_controller_local instance
is created as part of the server logic or module, each user session will create its owncrew_controller_local
object. Following that logic, each user creates its own separate R worker. This worker can be used for the plot module, if rendering that particular plot is a blocking operation.This may sound like an open door perhaps, but you might also want to consider reducing the plot rendering time and move computations out of the plot elsewhere and send that to a worker. Most of the time plot rendering takes long because there's a lot of data behind it, but the amount of detai…