-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Add sdk size to readme #2587
Add sdk size to readme #2587
Conversation
@buenaflor Seems illogical that the Dart only SDK would be larger than Dart Flutter on Android. Is this something we should look more into? |
@denrase I'm not sure tbh, it could also be that android does more aggressive optimizations but I think yea it makes sense to investigate a bit |
@buenaflor Should we do this separately from this PR? |
as discussed, let's check this again, maybe also build the apps locally in release mode with obfuscation on to check how it compares to the data we get from the CI |
Checking our build commands, we build all variants in release mode. Android & Dart (Console) are build for a specific architecture, while iOS API should contain multiple architectures. So it would make sense that the former are larger than the latter. Can't say why Android is smaller than dart only on linux though. iOSLine 19 in 914a9ec
The IPA containsu artifacts for multiple architectures as well as symbols. AndroidWe build for a specific ABI.
Line 24 in 914a9ec
Dart (Console)sentry-dart/metrics/build-dart.sh Line 12 in 914a9ec
Accorind to subcommands docs: A standalone, architecture-specific executable file containing the source code compiled to machine code and a small Dart runtime. |
@buenaflor I added |
iOS Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
0a82a1e | 1233.56 ms | 1244.56 ms | 11.00 ms |
0210372 | 1255.49 ms | 1280.98 ms | 25.49 ms |
7fd33d3 | 1241.92 ms | 1265.47 ms | 23.55 ms |
051e97a | 1245.94 ms | 1249.51 ms | 3.57 ms |
d10745a | 1251.29 ms | 1268.71 ms | 17.43 ms |
754cdbe | 1261.67 ms | 1280.88 ms | 19.20 ms |
8de999e | 1267.51 ms | 1281.00 ms | 13.49 ms |
5aba417 | 1265.31 ms | 1287.90 ms | 22.59 ms |
fec92cc | 1237.93 ms | 1259.21 ms | 21.28 ms |
64e4616 | 1242.80 ms | 1270.07 ms | 27.27 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
0a82a1e | 8.29 MiB | 9.37 MiB | 1.08 MiB |
0210372 | 8.38 MiB | 9.73 MiB | 1.35 MiB |
7fd33d3 | 8.38 MiB | 9.78 MiB | 1.40 MiB |
051e97a | 8.28 MiB | 9.34 MiB | 1.06 MiB |
d10745a | 8.28 MiB | 9.33 MiB | 1.05 MiB |
754cdbe | 8.29 MiB | 9.37 MiB | 1.08 MiB |
8de999e | 8.42 MiB | 9.88 MiB | 1.46 MiB |
5aba417 | 8.16 MiB | 9.17 MiB | 1.01 MiB |
fec92cc | 8.33 MiB | 9.54 MiB | 1.22 MiB |
64e4616 | 8.28 MiB | 9.34 MiB | 1.05 MiB |
as discussed, let's see if we can replicate the sentry dart sdk size that is shown with the --analyze-size flag |
Tested it now with the following commands. iOS With these results.
So the results are somewhat larger and the platforms closer together, probably due to more optimizations for when the apps are downloaded and run on real device hardware. I would argue it does not matter that much for the documentation. We don't need the exact values, but rather a ballpark of the overhead when using sentry. The purpose of the exact values in CI is for us to see if there is a large change in the overhead with functionality we introduce. So I will update the readme accordingly. android-plain.txt |
definitely, we just need to be clear why the Linux dart only big might be bigger in case users would wonder about that |
Android Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
b930b94 | 484.42 ms | 525.51 ms | 41.09 ms |
d8519f9 | 352.83 ms | 420.46 ms | 67.62 ms |
7ade5af | 341.04 ms | 386.84 ms | 45.80 ms |
73d70bf | 467.08 ms | 546.12 ms | 79.04 ms |
299a3f6 | 508.79 ms | 563.71 ms | 54.93 ms |
8776cdf | 353.32 ms | 416.58 ms | 63.26 ms |
e893df5 | 310.60 ms | 380.58 ms | 69.98 ms |
0764150 | 469.49 ms | 541.86 ms | 72.37 ms |
09c1f55 | 449.98 ms | 509.38 ms | 59.40 ms |
f2db4ec | 372.46 ms | 469.72 ms | 97.26 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
b930b94 | 6.49 MiB | 7.57 MiB | 1.08 MiB |
d8519f9 | 6.33 MiB | 7.26 MiB | 946.13 KiB |
7ade5af | 5.94 MiB | 6.95 MiB | 1.01 MiB |
73d70bf | 6.52 MiB | 7.59 MiB | 1.06 MiB |
299a3f6 | 6.49 MiB | 7.56 MiB | 1.07 MiB |
8776cdf | 6.34 MiB | 7.28 MiB | 966.66 KiB |
e893df5 | 6.06 MiB | 7.09 MiB | 1.03 MiB |
0764150 | 6.46 MiB | 7.48 MiB | 1.01 MiB |
09c1f55 | 6.49 MiB | 7.55 MiB | 1.07 MiB |
f2db4ec | 6.06 MiB | 7.03 MiB | 990.27 KiB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally looks good, we'd just need to check this regularly in case this is outdated at some point
|
||
## SDK Size Overhead | ||
|
||
The Sentry SDKs for Dart and Flutter typically add approximately 1-1.5 MB to an app’s binary size. The exact impact may vary depending on the device architecture. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe mention in production builds
#skip-changelog
Add sdk size to readme
Closes #2437