mirror of
https://github.com/block/buzz.git
synced 2026-11-14 13:21:02 +00:00
Follows #8897 (iOS HTTP/2), now on main. ## What Android gets the same app-wide shared sessions as iOS, backed by Cronet (`cronet_http`) instead of `NSURLSession`: - One Cronet engine per traffic class (API, media), so requests to a host multiplex over one HTTP/2 connection and gzip is inflated natively, off the Dart isolate. - HTTP/2 on, HTTP cache off, QUIC off. QUIC would be a separate behavior change, and `cronet_http`'s changelog lists DNS failures with QUIC on cellular. - Streamed uploads (media and voice notes) stay on `dart:io` on Android: `CronetClient` reads a request body into memory before sending it, which would break upload progress and copy large attachments in full. - If no Cronet provider is available (no Google Play services), the engine fails to build and the app keeps `dart:io`, as today. - Transport error classification covers Cronet failures alongside `NSURLSession` ones, so invite and pairing errors keep their friendly messages. ## Measurements Android emulator (API 36, arm64), profile builds of this branch and main, signed in to the Feedback community. 8 cold starts per build, alternating builds in blocks of 4. Times are for relay `/query` requests started in the first 8 s. | | main (`dart:io`) | this branch (Cronet) | |---|---|---| | First query response | 6.99 s | 1.99 s | | Startup burst settled | 8.36 s | 2.78 s | | Burst after the first connection | 1.44 s | 0.77 s | | Query latency after the first connection, median / p90 | 165 / 1567 ms | 106 / 158 ms | **Unexplained stall:** most of main's startup gap is a ~5 s stall before its first response on every cold start. Its cause is unconfirmed; my guess is `dart:io` loading its CA store on the emulator, which HTTP/2 itself wouldn't fix, so the first two rows likely overstate the win on real devices. The rows after the first connection exclude the stall and are the fairer comparison. I also tried emulated EDGE throttling, but the emulator's throttle did not slow its traffic, so there are no slow-link numbers yet. ## Regressions None found. Devices without Play services keep `dart:io`. Cleartext `http://` requests keep the handle's own `dart:io` client, as on iOS. ## Testing - Full mobile suite passes (`flutter test`, 4784 tests). - Automated app run on the emulator: onboarding, Feedback nsec import, channel and DM list load, and 16 cold starts with request timing. Media loading wasn't separately exercised. - No visible UI change, so no screenshots. --------- Signed-off-by: Tom Brow <tomb@squareup.com> Co-authored-by: Tom Brow <tomb@squareup.com>
111 lines
2.9 KiB
YAML
111 lines
2.9 KiB
YAML
name: buzz
|
|
description: Buzz mobile client
|
|
publish_to: 'none'
|
|
version: 0.0.0+1
|
|
|
|
environment:
|
|
sdk: ^3.11.4
|
|
flutter: ">=3.47.9"
|
|
|
|
dependencies:
|
|
flutter:
|
|
sdk: flutter
|
|
cupertino_icons: ^1.0.8
|
|
# Grapheme-cluster segmentation, for deciding whether a message body is
|
|
# nothing but emoji. Already present transitively via the Flutter SDK;
|
|
# declared here because we import it directly.
|
|
characters: ^1.4.0
|
|
hooks_riverpod: ^3.0.3
|
|
flutter_hooks: ^0.21.3
|
|
http: ^1.4.0
|
|
# Native HTTP transports, NSURLSession on iOS and Cronet on Android: HTTP/2
|
|
# and native gzip. See lib/shared/http/app_http_client.dart.
|
|
cronet_http: ^1.10.1
|
|
cupertino_http: ^3.1.0
|
|
jni: ^1.1.0
|
|
objective_c: ^9.5.0
|
|
crypto: ^3.0.7
|
|
flutter_secure_storage: ^10.0.0
|
|
flutter_svg: ^2.2.4
|
|
mobile_scanner: ^7.0.0
|
|
shared_preferences: ^2.5.5
|
|
web_socket_channel: ^3.0.1
|
|
connectivity_plus: ^7.0.0
|
|
nostr: ^2.0.0
|
|
buzz_secp256k1:
|
|
path: packages/buzz_secp256k1
|
|
pointycastle: ^4.0.0
|
|
url_launcher: ^6.3.2
|
|
gpt_markdown: 1.3.4
|
|
highlight: ^0.7.0
|
|
intl: ^0.20.2
|
|
uuid: ^4.5.1
|
|
file_selector: ^1.1.0
|
|
camera: ^0.12.0+2
|
|
image_picker: ^1.1.2
|
|
image: ^4.8.0
|
|
google_mlkit_selfie_segmentation: ^0.11.0
|
|
photo_manager: ^3.11.0
|
|
video_player: ^2.10.1
|
|
just_audio: ^0.10.6
|
|
record: ^6.2.1
|
|
package_info_plus: ^10.0.0
|
|
app_badge_plus: ^1.2.10
|
|
app_links: ^6.4.0
|
|
scrollable_positioned_list: ^0.3.8
|
|
open_filex: ^4.7.0
|
|
path_provider: ^2.1.6
|
|
share_plus: ^13.3.0
|
|
local_auth: ^3.0.2
|
|
unorm_dart: ^0.3.3
|
|
duo_kit: 0.1.1
|
|
flutter_cache_manager: ^3.5.0
|
|
file: ^7.0.1
|
|
path: ^1.9.1
|
|
|
|
dev_dependencies:
|
|
leak_tracker: ^11.0.2
|
|
shared_preferences_platform_interface: ^2.4.2
|
|
flutter_test:
|
|
sdk: flutter
|
|
flutter_lints: ^6.0.0
|
|
fake_async: ^1.3.3
|
|
camera_platform_interface: ^2.13.1
|
|
custom_lint: ^0.8.0
|
|
riverpod_lint: ^3.1.0
|
|
mocktail: ^1.0.4
|
|
# Test-only platform interface fakes (depend_on_referenced_packages).
|
|
path_provider_platform_interface: ^2.1.2
|
|
plugin_platform_interface: ^2.1.8
|
|
video_player_platform_interface: ^6.6.0
|
|
|
|
flutter:
|
|
config:
|
|
enable-swift-package-manager: false
|
|
uses-material-design: true
|
|
shaders:
|
|
- shaders/toast_island.frag
|
|
- shaders/onboarding_wordmark.frag
|
|
assets:
|
|
- assets/images/welcome-bee.svg
|
|
- assets/images/buzz-icon.png
|
|
- assets/images/shell-gradient.png
|
|
- assets/images/buzz-wordmark.png
|
|
# Generated by `just mobile-emoji-data` from the same emoji-mart dataset
|
|
# desktop uses. Do not hand-edit.
|
|
- assets/emoji/emoji-data.json
|
|
fonts:
|
|
- family: BuzzTabler
|
|
fonts:
|
|
- asset: assets/fonts/TablerIcons.ttf
|
|
- family: Inter
|
|
fonts:
|
|
- asset: assets/fonts/InterVariable.ttf
|
|
- asset: assets/fonts/InterVariable-Italic.ttf
|
|
style: italic
|
|
- family: GeistMono
|
|
fonts:
|
|
- asset: assets/fonts/GeistMono-Variable.ttf
|
|
- asset: assets/fonts/GeistMono-Italic-Variable.ttf
|
|
style: italic
|