Question regarding tradeoff of livecomponent

Hello,

I’m updating my app that was monolithic, ie using one big liveview handling all assigns. Updating objects result in big chunks of data transfered on the wire when lot of objects were handled within the assigns.
So I’m splitting it by using stateful livecomponents (assigns are still handled on the liveview level as before, not using phx-target right now). This results in incredible results concerning the volume of data transfered ! I had nearly nothing to modify in my code (so lots of kudos to the team !!!)

So my question (in direction to @josevalim, @chrismccord :wink: ) : what are the tradeoffs of having lots of livecomponent in a liveview ? Is it going to stress the server VM (memory footprint, cpu usage) ?
By lots, I mean hundred to a few thousands as of now.

Edit : I should add that I have two level deep nested livecomponent within the liveview.

Thanks a lot,
Sébastien.

2 Likes

Hi all,
I’m giving some feedback for others here.
I’m running liveview with 1200 components as of now, and so far it is good and responsive server side. But I had some performance troubles client side that can kill the browser.
So optimizations have been submitted and reviewed by José, some work is still in progress, but with that work I can say that it is performing very well :slight_smile:
Here is the thread to get more details if you are interested:

Cheers,
Sébastien

6 Likes