This repository has been archived on 2026-09-03. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
open-brainy/src/embeddings/candle-wasm
David Snelling bf71317d21 fix: prevent WASM embedding from blocking event loop during highlight()
embedBatch() with large inputs (e.g. 500 chunks from highlight()) runs
a single synchronous WASM forward pass that blocks the event loop for
200-500ms. Split large batches into micro-batches of 20 with setTimeout(0)
yields between each, keeping max blocking per batch to ~10-30ms.

Also change Cargo.toml opt-level from "z" (size) to 3 (speed) for
~15-20% faster WASM inference. Requires WASM rebuild to take effect.
2026-01-27 16:49:26 -08:00
..
.cargo feat: migrate embeddings to Candle WASM + remove semantic type inference 2026-01-06 12:52:34 -08:00
src fix: exclude __words__ keyword index from corruption detection and getStats() 2026-01-27 15:38:21 -08:00
Cargo.toml fix: prevent WASM embedding from blocking event loop during highlight() 2026-01-27 16:49:26 -08:00