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
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
musiclover
musicloverOP3y ago
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
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
musiclover
musicloverOP3y ago
So do you think 100kb is small in most cases for users? I'm making simple gui app..
Alex Lohr
Alex Lohr3y ago
100kb is basically baseline for a react app... Is this before or after compression with brotli? After.
musiclover
musicloverOP3y ago
What is brotli? my solid app size is 100kb before compression.
Alex Lohr
Alex Lohr3y ago
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?
musiclover
musicloverOP3y ago
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.
Alex Lohr
Alex Lohr3y ago
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?
musiclover
musicloverOP3y ago
Yes I'm building via Vite. 100kb is after minified.
thetarnav
thetarnav3y ago
you can try using source-map-explorer to see what can be trimmed down In vite config you have to enable generating source maps:
build: {
sourcemap: true,
},
build: {
sourcemap: true,
},
Run this cli command to generate html page with source maps visualised:
pnpx source-map-explorer --no-border-checks --gzip dist/*.js*
pnpx source-map-explorer --no-border-checks --gzip dist/*.js*
musiclover
musicloverOP3y ago
Thanks for the amazing tip..I'll definitely use it..!!
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
musiclover
musicloverOP3y ago
Just a question, Why do you use React instead Solid?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
musiclover
musicloverOP3y ago
Can you use Solid component in React app?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
musiclover
musicloverOP3y ago
Hmm..looks like complex...Will you stick to React for next 5 years?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Some Call Me Tim
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 😉
musiclover
musicloverOP3y ago
Will you completely covert your huge React app codes to Solid ?
Some Call Me Tim
Yep, I'm almost done, 5 months in so far 🙂
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
musiclover
musicloverOP3y ago
Damn 5month.. Are you one man band? or team ?..
Some Call Me Tim
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 🙂

Did you find this page helpful?