Skip to content

Commit 67d994c

Browse files
committed
chore: improve README
1 parent be1a7a5 commit 67d994c

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -532,19 +532,20 @@ void processingWorker(dynamic params) {
532532

533533
* ✅ Eliminates the O(n) copy for large buffers; measurable improvement at ~1 MB+.
534534
* ✅ Pre-building `TransferableTypedData` before calling `compute()` removes the codec overhead and is the fastest option.
535-
* ⚠ Small buffers (< ~100 KB) may see no net gain or a slight regression due to codec overhead.
536-
* ⚠ The source buffer is consumed by `TransferableTypedData`; do not reuse the original `Uint8List` after calling `compute()` with it as a transferable.
535+
* Small buffers (< ~100 KB) may see no net gain or a slight regression due to codec overhead.
536+
* The source buffer is consumed by `TransferableTypedData`; do not reuse the original `Uint8List` after calling `compute()` with it as a transferable.
537537

538538
**Web — dart2js:**
539539

540540
* ✅ Source `ArrayBuffer` is transferred in O(1); the worker receives the original memory.
541541
* ✅ Large speedups (2–10×) for MB-range payloads compared to copy-based transfer.
542-
* ⚠ Source buffer is **neutered** after `compute()` returns — `data.buffer.lengthInBytes` becomes 0. Keep a reference to the result instead.
542+
* Source buffer is **neutered** after `compute()` returns — `data.buffer.lengthInBytes` becomes 0. Keep a reference to the result instead.
543543

544544
**Web — dart2wasm:**
545545

546-
* ⚠ WASM uses linear memory that is opaque to the JS engine. Every transfer still requires a copy from the WASM heap to a JS `ArrayBuffer`, so using `transferables` adds codec overhead with no speed benefit.
546+
* WASM uses linear memory that is opaque to the JS engine. Every transfer still requires a copy from the WASM heap to a JS `ArrayBuffer`, so using `transferables` adds codec overhead with no speed benefit.
547547
* Prefer omitting `transferables` when targeting WASM.
548+
* ⚠️ **Note:** `enableWasmTransferables` is set to `true` by default for WASM targets to disable transferables on WASM targets to avoid codec overhead. If you want to disable it, set `enableWasmTransferables: false` in the `IsolateManager` constructor.
548549

549550
### Handling Exceptions (Web)
550551

0 commit comments

Comments
 (0)