Skip to content

☂️ make initial load of canvaskit faster #76009

@franarolas

Description

@franarolas

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

I'm experiencing a huge difference in the initial load time of the web app in the versions 1.26 and 1.27, the load time now is about 2-3 seconds slower.
The lighthouse tool can't even test the app performance as it is too slow.
Once the app is loaded, it is as fast as always.

It is affecting also the hot-reload time, it now takes about 10 seconds more to reload my project(A big project with more than 240 files and around 30000 written code lines).

I would be working with the 1.25 version(As everything was working fine, including SVGs), but I really need the Scrollbar implemented in 1.26.

Steps to Reproduce

Just create a new Flutter project and test the different versions initial load time(Without cache).

I'm not posting my Flutter doctor as it is unrelated.

Lighthouse audits in different versions:

Alpha - 1.27.0-1.0.pre:
image

Beta - 1.26.0-17.5.pre:
image

Beta - 1.25.0-8.3.pre:
image

Everything is tested in a production server, with the release version and the following pubspec:

name: flutter_load_test
description: A new Flutter project.

publish_to: 'none'

version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

dev_dependencies:
  flutter_test:
    sdk: flutter

flutter:
  uses-material-design: false

Metadata

Metadata

Labels

P1High-priority issues at the top of the work listc: performanceRelates to speed or footprint issues (see "perf:" labels)customer: chillicustomer: crowdAffects or could affect many people, though not necessarily a specific customer.e: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webengineflutter/engine related. See also e: labels.found in release: 1.26Found to occur in 1.26found in release: 1.27Found to occur in 1.27has reproducible stepsThe issue has been confirmed reproducible and is ready to work onperf: speedPerformance issues related to (mostly rendering) speedplatform-webWeb applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions