-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Research: How to improve load time for Flutter Web App #315
Comments
The answer might be a bit old, but maybe there are some ideas we can try from this: |
Can we start by updating the Lines 21 to 22 in b067343
To the latest possible version of Is there a way to compile to |
I'm inclined to include the That way when the person visits |
@SimonLab please have a look at: https://stackoverflow.com/a/71456514/1148249 🤞 |
My reading of https://dwylapp.fly.dev/main.dart.js Is that is very far from "optimised" or minified ... 🐌 It's This is absurd. And is the most immediate "low hanging fruit" we can tackle to improve load time. We need to go through: https://docs.flutter.dev/deployment/web |
The |
I'm going to share another solution that is mentioned in flutter/flutter#76009 (comment), which was mentioned in https://stackoverflow.com/questions/64127202/flutter-web-website-takes-a-long-time-to-load-initially. It basically involves adding a loading/splash screen while the app loads. This should address the poor |
@LuchoTurtle lets test adding Load/Splash screen to one of the deployed Demo apps to test it. I’m strongly against loading screens. They are a crutch for poor engineering. But I also understand the psychology of waiting and progress bars. I just think they show ineffective engineering. 💭 |
As noted above #315 (comment) the The Lines 59 to 60 in 7f689cc
I suggest we attempt to follow the docs: https://docs.flutter.dev/development/platform-integration/web/renderers#examples At at the very least add the flutter build web --release Also considering changing the renderer to flutter build web --release --web-renderer html Anyone have any objections to me making these changes? 🚧 |
I don't. I thought source: https://docs.flutter.dev/testing/build-modes#release However, I feel like adding those flags won't make a difference.
|
Having read https://geekyants.com/blog/web-renderers-which-one-to-choose-html-or-canvaskit/,
|
Indeed. At this point I just want to experiment with the options and see what results in a faster load time. |
We need to understand if the continuous build/deploy to Fly.io is working. 🤷♂️ Minor decrease in Mobile Performance: https://pagespeed.web.dev/report?url=https%3A%2F%2Fdwylapp.fly.dev%2F Need to understand if the build with |
@nelsonic I've implemented the differences between web renderers and added a splash screen on the deployed |
The The "splash screen" while annoying, makes an appreciable difference to the perceived loading time We need to optimise our |
I believe this should be closed now 👍 |
@LuchoTurtle as much as I want to agree, sadly, not even close. 😞 We get: https://pagespeed.web.dev/report?url=https%3A%2F%2Fdwylapp.fly.dev If we can't do better than We need to understand how much of the
For comparison: our I think our Side Quest: #322 |
It's because I'm testing with Desktop resolutions, which is what Though I agree with you that the web mobile performance numbers are lacking (even if there's an app for it). |
For future reference and avoidance of all doubt. We only care about But that's only because it's where I spend most of my day. i.e. working on laptop. 👨💻 We almost never want to test So in future, please always test on |
Visiting https://dwyl.github.io/app/... The results seem to be similar to that of |
Yeah, similar perf, but we wouldn't have known without trying. Thanks. 👌 |
I see How do we "Reduce unused |
I don't know if there's any actionable way of reducing Javascript, it's all built by their Dart Compiler. The only way that I know that we can control the size of the Our app is super plain and simple, I don't know where we are not using JS 🤔 |
I mean, even when Flutter's official gallery (which was developed in Flutter) has a performance of 56, it's quite telling that |
indeed. the flutter example has relatively poor web performance. 🐌 🙄 A good way to compare/contrast is to look at the amount of By contrast our The I still want to explore the any/all potential options for optimisation. |
|
At present the PageSpeed Insights for the https://dwylapp.fly.dev/
Flutter
Appare quite poor for
Performance
: https://pagespeed.web.dev/report?url=https%3A%2F%2Fdwylapp.fly.dev%2FTodo
HTML
landing page that then loads the App in the background and replaces theHTML
page once theFlutter
App has loaded? -> Feat: Loading Screen #319 -> [PR] Adding splash screen #321Flutter Web App
toGitHub Pages
: Feat: DeployFlutter Web App
toGitHub Pages
#322 -> [PR] Deploy to Github pages. #323The text was updated successfully, but these errors were encountered: