shorebirdtech / shorebird

Code Push for Flutter and other tools for Flutter businesses.
https://shorebird.dev
Other
2.24k stars 133 forks source link

fix: sync* might be causing lag after installing patch (shorebird 1.0) #1882

Closed synapsecode closed 2 months ago

synapsecode commented 5 months ago

App ID: c3c94c22-2fe0-468b-aeed-7dccf476719c

Description This bug is a follow-up of #1731 While the 1.0 release has fixed the issue (massive lag in unpatched app when sync* was used in a package) in the unpatched shorebird app, the patched app still has this issue.

Reproducible Github Repository: https://github.com/synapsecode/sbslowtest

steps taken:

Expected Behavior I expect the code to be a little bit slower (due to the link percentage) but this is too slow to accept.

Shorebird Versioning

Shorebird 1.0.0 • git@github.com:shorebirdtech/shorebird.git
Flutter 3.19.5 • revision 25bc2b57a159f5b52385c4adb5c80f6ed25ae6d5
Engine • revision 8bc63bb51f4faded9bcac161762355ce110446a4

Flutter Versioning

Flutter 3.19.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 300451adae (12 days ago) • 2024-03-27 21:54:07 -0500
Engine • revision e76c956498
Tools • Dart 3.3.3 • DevTools 2.31.1

Output of ShorebirdPatch

[WARN] shorebird patch was only able to share 47.4% of Dart code with the released app.
This means the patched code may execute slower than expected
📱 App: sbslowtest (c3c94c22-2fe0-468b-aeed-7dccf476719c)
📦 Release Version: 1.2.0+1
🕹️  Platform: ios [aarch64 (624.35 KB)]
🟢 Track: Production
🔗 Running 47.4% on CPU
synapsecode commented 5 months ago

unfortunately this means that we wont be able to integrate shorebird into our future release. looking forward to this being resolved in the coming weeks. thanks!

eseidel commented 5 months ago

Thank you very much for the report.

eseidel commented 5 months ago

I think it depends on what types of changes are being done. It looks like the link percentage here was 47% (which is quite low). We will track this as part of https://github.com/shorebirdtech/shorebird/issues/1892.

We just released a fix that should improve link percentages by 10-15% across the board, but still would not be good enough in this example. Will update here again once we have closed https://github.com/shorebirdtech/shorebird/issues/1892 and believe we've fixed the outstanding linker issues.

eseidel commented 4 months ago

Update: We've not forgotten about this, just been busy getting the rest of the linking work done. We expect to ship more linking fixes early next week and hopefully all of them in the next two weeks and then can circle back and see if this is still an issue.

eseidel commented 3 months ago

As soon as we ship https://github.com/shorebirdtech/shorebird/issues/1892 I think this is our next bug to look at @felangel

eseidel commented 2 months ago

We believe this is fixed in 3.22.2. We would love to work with you to identify further if you still believe it's not. Thank you very much for the report!