Are live views processes?

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.

1 Like

yes, I checked the tab “processes” but I can’t identify which processes could be the live views 
 :confused:

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.