For anyone curious: A simple hello world Compose ...
# compose-web
a
For anyone curious: A simple hello world Compose Web app (wasm - Box + BasicText) take 3~4 seconds to download and be rendered on a web page. no dependencies other than compose foundation server is digital ocean VPS
f
That’s pretty much unacceptable, and kills your SEO…
a
how does it kill your seo?
does google give u a penalty for long fetches?
f
I’m not sure on the specific details; But yes. I think Google gives your SEO a penalty if you page renders slowly; See also: Lighthouse https://developer.chrome.com/docs/lighthouse/overview
a
this is irrelevant then. compose web uses canvas which is not read by search engines
f
SEO was already killed because of canvas, now with extra overkill for the render speed 😂
a
yup. if seo is important for you, don't use compose web
a
@Frank Bouwens canvas based sites are bad for SEO anyways
a
that being said, I would be so happy if we get to the point that simple hello world apps take <1 second to be rendered
b
What is transferred size? Is compression is on server side? Is it optimized/prod build?
a
URL: https://composablesui.com/wasmdemo/ > What is transferred size? transfer size i think is 3mb? the wasm file at least seems to be 3mb at the js console > Is compression is on server side I don't know what that means. i am serving the output files via the express static folder > Is it optimized/prod build? not sure. i use
./gradlew webBrowserDistribution
. haven't seen any other gradlew tasks and i am assuming that's the one for distribution/release
b
which kotlin version do you use?
as I see, compression is on, 3.2 MB it’s skia, there is 458 KB binary with other parts (libs, including compose + app)
a
Copy code
kotlin = "2.0.0"
compose = "1.6.11"
e
It took about 1.5 seconds on my first visit to https://composablesui.com/wasmdemo/ on my phone, and is pretty much instantaneous after that (I'm assuming it gets cached)
a
do you live next to my server? 😄
😅 1
b
You can try to play with preload to force loading wasm files earlier
it may save you 1-2 seconds
a
@bashor what do you mean by earlier? earlier than what?
b
earlier than now, before
wasmdemo.js
is loaded
r
It's not that bad, LOL 😉
😁 2