Page MenuHomePhabricator

[Rust Q3] Avoid reading .wasm binaries in async tasks
Closed, ResolvedPublic

Description

Description

Rust limits file I/O to the main thread, causing contention if multiple worker threads want to read a file. Therefore, instead of reading the .wasm binaries each time we spin up a new task, we should instead read the contents of the .wasm files ONCE and store them locally so that worker threads can simply borrow them.

Desired behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)

  • no more file I/O initiated by worker threads

Completion checklist

Details

Related Changes in Gerrit:
Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Construct Executors with binary instead of file name.repos/abstract-wiki/wikifunctions/function-evaluator!468apineapine-wasm-copymain
Customize query in GitLab

Event Timeline

cmassaro renamed this task from [Rust Q2] Avoid reading .wasm binaries in async tasks to [Rust Q3] Avoid reading .wasm binaries in async tasks.Dec 17 2025, 2:32 PM

Change #1238720 had a related patch set uploaded (by Jforrester; author: Jforrester):

[operations/deployment-charts@master] wikifunctions: Upgrade evaluators from 2026-01-27-063404 to 2026-02-11-123504

https://gerrit.wikimedia.org/r/1238720

Change #1238720 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Upgrade evaluators from 2026-01-27-063404 to 2026-02-11-123504

https://gerrit.wikimedia.org/r/1238720