Hi,
the live views are processes?
In that case, from the live view dashboard,
can I see how many live views are running?
Regards
Hi,
the live views are processes?
In that case, from the live view dashboard,
can I see how many live views are running?
Regards
Yes! Every time a user opens a webpage, the LiveView-code is first rendered in-place but following that the browser will execute a tiny bit of JavaScript that will âmountâ the LiveView: connect to a websocket-connection to make the LiveView interactive. This WebSocket-connection and thus the interactivity of the LiveView is handled by a dedicated process. So there is one process per mounted LiveView.
These indeed show up under the âprocessesâ tab in the LiveDashboard, I believe.
yes, I checked the tab âprocessesâ but I canât identify which processes could be the live views âŠ
You can call IO.inspect(self())
in mount to see the PID, then search for that in the processes list.
It wonât show you that much in the dashboard though, really the rough memory usage is probably the only really useful data.