Has anyone found a way to slim down the release di...
# compose-web
a
Has anyone found a way to slim down the release distributable? I saw someone suggesting here to use br or gzip encoding but what happens if we do not have access to the server (ie serving via github pages)
i
Github uses gzip for artifacts already.
a
how does that work? do i need to do anything special from my side?
i
No, just typical behavior for most static asset hosting/cdns
👌 1
d
I think Compose HTML's output is like 5x smaller, in case that's an option for you. (The JS generated by Compose HTML compresses pretty well it seems).
m
The bundled Skia (Skiko) is the main thing that slows down the load of Compose Web apps, and I think that it's already compressed the most.
For better UX, you can add a loader using Compose HTML. It's possible to have both Compose HTML and Compose Web on the same app.
a
@David Herman isnt compose web and compose html two separate thing with their own components? it's not a straightforward switch, right? @mohamed rejeb i can think of ways to improve the ux, but ideally i want to get the loading time as close to zero as possible
m
Yes you will need to rewrite everything if you want to switch to Compose HTML.
a
For now I decided to display a static preview of the component and then load the compose-web app if compose web is available. Not perfect but getting there https://composablehorizons.github.io/compose-menu/
d
Yeah, as @mohamed rejeb said, it's an entirely different codebase (although of course you could share business logic using KMP). I didn't know your situation, and assumed it wasn't a possibility for you, but if there are lurkers here who haven't started a project yet, that could be good information for them to consider.