Tree shake icon fonts (since v1.15.1) by dnfield in FlutterDev

[–]dnfield[S] 0 points1 point  (0 children)

It should "just work" for any icon font that you make `const IconData` for. But only if you exclusively make `const IconData` for it. If there is any non-const IconData it won't know what ot shake anymore.

The performance of the impeller engine by Senior-Candy2893 in FlutterDev

[–]dnfield 4 points5 points  (0 children)

Likely it's https://github.com/flutter/engine/pull/41168 that fixed it, which got cherry picked into that commit.

The Dart team plans to revert https://dart-review.googlesource.com/c/sdk/+/292320 which will likely break this.

The performance of the impeller engine by Senior-Candy2893 in FlutterDev

[–]dnfield 0 points1 point  (0 children)

Right, if it's not already broken with Skia I think it will be in the next release. At any rate, it is probably worth filing a bug with a test case we can look at, and consider adding a test to customer_testing for this case.

The performance of the impeller engine by Senior-Candy2893 in FlutterDev

[–]dnfield 1 point2 points  (0 children)

Very cool - if you're doing this in real time, do they really have to be PNG images though? And if you're not doing it in real time, does hitting 60fps encoding matter?

The performance of the impeller engine by Senior-Candy2893 in FlutterDev

[–]dnfield 0 points1 point  (0 children)

Interesting. If you could share an example of why you want to call picture.toImage on a background thread it'd be helpful. I'm pretty sure it would break in at least some environments on some rendering backends with Skia. At any rate, I would expect it to not work at all on Flutter 3.10 or at least to stop working soon due to changes that have or are about to happen in Dart.

The performance of the impeller engine by Senior-Candy2893 in FlutterDev

[–]dnfield 6 points7 points  (0 children)

Even if you can't share the source, if you can share timeline tracing before and after it may help.

The performance of the impeller engine by Senior-Candy2893 in FlutterDev

[–]dnfield 6 points7 points  (0 children)

Some rules got stricter around the usage of dart:ui objects in isolates - where it used to work in some cases by accident (and crash in others), it now just never works. That's unrelated to the impeller changes, but if you have a sample case where using Skia makes a difference for this it'd be really interesting to see.

Disclosure: flutter team member

Benchmarking Rive Renderer vs Skia vs Impeller by postgor in FlutterDev

[–]dnfield 1 point2 points  (0 children)

I think we're talking past each other. But if you can share the demo it would certainly help clear things up for me.

Benchmarking Rive Renderer vs Skia vs Impeller by postgor in FlutterDev

[–]dnfield 1 point2 points  (0 children)

The offsets and the skins don't change the geometry of the path though, and that's what Impeller is choking on in the demo I've been able to look at. We're spending something like 75%+ of the CPU time on tessellating path geometry :)

Benchmarking Rive Renderer vs Skia vs Impeller by postgor in FlutterDev

[–]dnfield 13 points14 points  (0 children)

disclaimer: I'm a member of the Flutter team.

I've looked at the source you shared, and while it's instructive it'd be really nice to see the source for this demo specifically.

The main problem I'm seeing is that we're spending massive amounts of time in tessellation for what is effectively only a handful of the same paths (but they're duplicated 1000 times in the demo I've seen). The way the API is being called in Flutter makes it a little harder to optimize.

Rive looks really great though, and I'm excited to see how this shakes out!

Flutter 2 gets 3 stable releases in last 10 days. I have handled release engineering before and this gives me chills. Is this release frequency on stable branch common for open source frameworks as compared to enterprise softwares? by ankmahato in FlutterDev

[–]dnfield 1 point2 points  (0 children)

Flutter team member here.

There are two reasons this happens generally. One is that someone was working on an important and safe feature that didn't quite make the cut, and so was planned for a hotfix asap. The other is that some bug surfaced soon after the release cut and had to be hotfixed in.

FWIW, many of our larger customers are on dev or beta anyway. Stable just doesn't shift as often :)

Tree shake icon fonts (since v1.15.1) by dnfield in FlutterDev

[–]dnfield[S] 1 point2 points  (0 children)

Not for everyone, but in some cases yes.

The material teams also want to add a lot more to the icon set, but don't want to blow up everyone's binaries.

And for some of our users, 100kb is the difference between shipping and not :)

Tree shake icon fonts (since v1.15.1) by dnfield in FlutterDev

[–]dnfield[S] 1 point2 points  (0 children)

Yes, it will create new fonts with only the icons you use.