Skip to content

Commit

Permalink
doc: add a note about patch performance
Browse files Browse the repository at this point in the history
  • Loading branch information
eseidel committed Sep 10, 2024
1 parent 11c91be commit 49fb21e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/content/docs/code-push/patch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,22 @@ need to put `flutter build` arguments after a `--` separator. For example:
`shorebird patch android -- --dart-define="foo=bar"` will define the `"foo"` environment
variable inside Dart as you might have done with `flutter build` directly.
:::


### Patch Performance

Android: Patching an application on Android has no effect on performance.

iOS: Patching an application on iOS normally does not affect an application
performance. However the patching mechanism on iOS is different from Android.
Unchanged code runs as normal (on the CPU), however changed (or added) code will
run in a Dart interpreter (which is slower than the CPU) Normally this change
is undetectable, but if you are changing particularly performance-sensitive code
(e.g. code for processing images, or large data that is written in Dart) you may
see a performance difference after patching. If you ever see unexpected
performance changes when patching on iOS, please [contact
us](mailto:[email protected]) we would love to work with you to understand
and fix!

You can always test your patches before sending them to users using by
[staging patches](/staging-patches)

0 comments on commit 49fb21e

Please sign in to comment.