• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-flutter / 32373781271
89%

Build:
DEFAULT BRANCH: main
Ran 20 Aug 2026 01:22PM UTC
Jobs 10
Files 119
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Aug 2026 01:21PM UTC coverage: 88.496% (+0.07%) from 88.424%
32373781271

push

github

web-flow
perf(yet_another_json_isolate): process small payloads inline and large ones on short-lived isolates (#1746)

## What kind of change does this PR introduce?

Performance improvement for `yet_another_json_isolate`, plus a benchmark
to keep it honest. Resolves the copying and serialization overhead of
the long-lived isolate design.

## What is the current behavior?

`YAJsonIsolate` keeps one long-lived isolate per instance and routes
every `decode`/`encode` through it. This has three hidden costs:

- Small payloads pay an isolate messaging round trip that costs more
than parsing them inline.
- Large decoded object graphs are deep-copied back to the calling
isolate, which roughly doubles the work and stalls the main isolate for
up to ~10ms on 5MB payloads.
- Concurrent calls are processed one at a time through a single event
queue.

On top of that, both postgrest and the functions client decode the HTTP
body bytes to a `String` on the main isolate before handing it over.

## What is the new behavior?

The long-lived isolate is gone. The public API is unchanged
(`initialize`/`dispose` are kept as compatibility no-ops with the same
contracts), and internally:

- Payloads estimated below 64KB are processed inline, where the parse
takes well under a millisecond even on slow devices.
- Larger payloads run on a short-lived isolate per call via
`Isolate.run`, whose result is handed back through `Isolate.exit`
without copying. Concurrent calls run in parallel.
- A new `decodeBytes(Uint8List)` API takes HTTP `bodyBytes` directly:
the bytes move to the isolate via `TransferableTypedData` without
copying, and the UTF-8 and JSON decoding steps are fused so the
intermediate string never materializes on the calling isolate. The
postgrest and functions clients now use it.
- `encode` picks its path with a cheap bounded size estimate
(depth-capped, so cyclic input still reaches `jsonEncode`'s own cycle
error on the isolate).

## Benchmarks

A benchmark now lives in `pack... (continued)

57 of 59 new or added lines in 3 files covered. (96.61%)

5908 of 6676 relevant lines covered (88.5%)

4.35 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
81.74
-0.08% packages/postgrest/lib/src/postgrest_builder.dart
1
98.41
3.97% packages/yet_another_json_isolate/lib/src/_isolates_io.dart
Jobs
ID Job ID Ran Files Coverage
6 supabase_functions - 32373781271.6 20 Aug 2026 01:22PM UTC 4
97.83
GitHub Action Run
7 supabase_flutter - 32373781271.7 20 Aug 2026 01:22PM UTC 11
81.82
GitHub Action Run
8 postgrest - 32373781271.8 20 Aug 2026 01:24PM UTC 11
85.11
GitHub Action Run
9 supabase - 32373781271.9 20 Aug 2026 01:25PM UTC 14
91.3
GitHub Action Run
10 yet_another_json_isolate - 32373781271.10 20 Aug 2026 01:22PM UTC 1
98.41
GitHub Action Run
5 supabase_common - 32367207852.5 20 Aug 2026 12:08PM UTC 20
87.65
GitHub Action Run
9 supabase_realtime - 32367207852.9 20 Aug 2026 12:12PM UTC 13
90.27
GitHub Action Run
3 supabase_storage - 32367207852.3 20 Aug 2026 12:11PM UTC 9
97.31
GitHub Action Run
6 iceberg - 32367207852.6 20 Aug 2026 12:08PM UTC 6
68.62
GitHub Action Run
2 supabase_auth - 32367207852.2 20 Aug 2026 12:12PM UTC 30
90.67
GitHub Action Run
Source Files on build 32373781271
  • Tree
  • List 119
  • Changed 11
  • Source Changed 10
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #32373781271
  • 7942c377 on github
  • Prev Build on main (#32367207852)
  • Next Build on main (#32465485913)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc