What is the Phoenix liveview bundle size?

Can anyone tell me what to expect for the Phoenix liveview frontend bundle size? (Google didn’t seem to produce quick results on this for me.)

To be clear, since there are two stages to loading a liveview page, I’d like to know the overhead for both steps.

I’m also curious about if it has historically grown a lot or if it can be expected to grow much with new features?

great question! - the JS is:

phoenix.js - 6.4kb
(input https://raw.githubusercontent.com/phoenixframework/phoenix/main/priv/static/phoenix.min.js on GZIP Compression Test | GiftOfSpeed)

phoenix_live_view.js - 26kb
(input https://raw.githubusercontent.com/phoenixframework/phoenix_live_view/main/priv/static/phoenix_live_view.min.js on GZIP Compression Test | GiftOfSpeed)

and then 1kb for topbar.js and the very little you have in app.js from the get go…

so less than 35kb of minified and gzipped JS… (caveats apply I may be missing something. etc.)

You should NOT expect this to grow by much, as it’s seems very feature complete by now.

for the loading it depends on the actual page - data, async loading, use of streaming etc. etc.

2 Likes

That seems right. I just made a fresh new Phoenix app and building assets for production resulted in a 33kb app.js.gz file.

2 Likes

@Sorc96 @outlog

Thank you! :slightly_smiling_face: