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
☂️ make initial load of canvaskit faster
#76009
Comments
would be interesting to introduce a test based in lighthouse to prevent regressions |
@franarolas what web renderer are you using, html or canvaskit? |
@azbuky Always the default one, it should be always canvas as I am testing it through desktop browser |
Hi @franarolas 1.25 doesn't use canvaskit by default, it's HTML, canvaskit default change is recent and not present in 1.25
When using default on 1.25 (HTML)
|
@TahaTesser |
Applications using However, if subsequent app reloads are slow in any mode, please let us know. For now, I'm going to treat this issue as a feature request to make CanvasKit initial start-up time faster. |
@yjbanov Just testing the web apps that have been shown on the Flutter Engage today, the initial load with canvas is too slow to be in production, I think that you guys should put that on the top of the priorities. |
The CDN hosting canvaskit is having issues.. can we enable an option to bundle canvaskit with our app, or in the interim simply move to a different CDN? |
Same issue with flutter 2.2.0 |
Also the js code is not tree shaken. I mean the library used and included inside the scripts in index.html. I believe this is something that has a high return on investment and can be implemented today by the flutter team (using existing tools ofc) |
There are a few ongoing efforts to improve this:
We're going to treat this an the umbrella issue for improving load times, but a lot of work will be happening in smaller individual issues. |
Can you streamline the process of running canvaskit more, |
This comment was marked as duplicate.
This comment was marked as duplicate.
People, no need to ping this issue once a week. Do you think we'd hide development in one of the most requested features in the project? (Answer: no) Stay tuned! |
This comment was marked as duplicate.
This comment was marked as duplicate.
We try to patch the generated Those patches are based on Flutter master channel and a self-hosted canvaskit. window.flutterConfiguration = {
canvasKitBaseUrl: "./canvaskit/"
}; |
Hi. Are you able to link issues for these listed things? (if the links are still not available, my apologies) Does any of the strategy above includes breaking up canvaskit in parts so only the required parts are loaded first to accelerate first time flutter web visit? |
@harryfei interesting, do you have any flutter website in production where I can test the improvements? |
@TMSantos Yeah, we use this patch in our E2EE file transfering app Note that we add a loading indicator to avoid blank screen. So use the chrome dev tools to see real flutter first screen rendering time. |
What do you think about this solution -> https://github.com/SchabanBo/deferred_test |
@harryfei actually from everything that was said, your example is the only one that I can feel some improvement, well done |
How can i use this patch to my flutter web app? Can you explain step by step please? |
|
Thanks for your help. flutter master channel is breaking various things, so I will have to wait with " fancy CircularProgressIndicator" XD |
is the master channel mandatory to apply this patch? |
@razfazz Yeah. master channel has some modifications(fixing service worker cache bug) for |
@harryfei Does it work on windows machine? |
@jeancc29 Yeah. it's a patch for flutter web which is just javascript and html. So It works on all OSes including Windows. |
We've dropped the size of CanvasKit from 2.8MB compressed to 2.0MB compressed and 1.5MB compressed on Chromium-based browsers. We're going to close this issue for now, and track our further work on load time with follow-on issues. |
@eyebrowsoffire Can you point us to the Git commit or Github PR? Also, what release of Flutter will have this update? |
CanvasKit size changes are in Flutter 3.10. There is no single PR or git commit that is responsible for the size drop, it is a cumulative effect from many changes as part of a large effort to drop code size. The main things that contributed to the size drop:
|
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Hello everyone!
This post is a request from the Flutter community to request an improvement on the start load time of Flutter Web.
As most of you know, the initial load time when using the canvas build is way too long for a production product, so most of the people are not choosing Flutter Web for their web apps.
Thank you all for voting this up, I hope that this gets solved as soon as possible.
Since the old post didn't make much sense in the context of what we are trying to achieve, I decided to rewrite the post.
Old post
The text was updated successfully, but these errors were encountered: