Is my Solid app size is huge?
index.css: 16.61KiB / gzip: 3.60 KiB
index.js: 87.04KiB / gzip: 27.29 KiB
I always check my build size whenever I add new codes. I wonder if my app size is huge or not.
Is it even small?
25 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
It's almost final. but I think I would add 20kb ~ 30kb code. So I guess my final build will be around 120kb ~ 130kb. Is it huge? Because I worry about performance if my js bundle size is huge...css file size too.. (16.61kib)..
I'm targeting desktop device mostly.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
So do you think 100kb is small in most cases for users? I'm making simple gui app..
100kb is basically baseline for a react app... Is this before or after compression with brotli?
After.
What is brotli?
my solid app size is 100kb before compression.
brotli is a gzip-compatible compressor.
It is usually 5-30% better than gzip at its highest level.
100kb before compression is really good.
It's usually less than ⅓ after compression.
What does your app do?
My app is music creation app. My goal is to make 50kb before compression. I felt performance goes to slow if js file size is getting bigger.
That sounds pretty difficult. If I were in your place, I would optimize the lowest hanging fruits and be done with it, because usually, further optimizations are increasingly more difficult and you get diminishing returns.
Is the 100kb already minified?
Yes I'm building via Vite. 100kb is after minified.
you can try using
source-map-explorer
to see what can be trimmed down
In vite config you have to enable generating source maps:
Run this cli command to generate html page with source maps visualised:
Thanks for the amazing tip..I'll definitely use it..!!
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Just a question, Why do you use React instead Solid?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Can you use Solid component in React app?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Hmm..looks like complex...Will you stick to React for next 5 years?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
I am just about done converting something very similar, 6 y/o React app with 100k+ LOC. So far 25% browser memory usage decrease and some major spaghetti decrease internally as well 😉
Will you completely covert your huge React app codes to Solid ?
Yep, I'm almost done, 5 months in so far 🙂
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Damn 5month.. Are you one man band? or team ?..
Yeah, 25 is a biggie, especially because it allows people to embed/iframe content they make in their own site. Now I won't have to worry so much about mobiles crashing if they embed more than 3 or so in their pages.
One man band for the most part 🙂