Refactor DSP Pipeline: Implement Worker Pooling and Raw Pointer API#14
Draft
jLynx wants to merge 1 commit into
Draft
Refactor DSP Pipeline: Implement Worker Pooling and Raw Pointer API#14jLynx wants to merge 1 commit into
jLynx wants to merge 1 commit into
Conversation
- Replaced individual DSP workers for each VFO with a pooled worker model. - Introduced dynamic slot management for VFOs within the worker pool. - Updated methods for adding and removing VFOs to accommodate the new pooling strategy. - Enhanced audio processing to handle batched results from workers, improving performance. - Adjusted remote client handling to utilize the new worker pool structure. - Cleaned up and optimized existing code for clarity and maintainability.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
browsdr | 5ff6d17 | Commit Preview URL Branch Preview URL |
Apr 11 2026, 10:37 AM |
Owner
Author
|
I'm still not convinced this is the correct approach to improve performance. I think more tests are needed before this PR is ready |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR significantly optimizes the DSP architecture by moving from a "one-worker-per-VFO" model to a more scalable pooled worker system. It also introduces a raw-pointer-based WASM API to bypass
wasm-bindgenborrow-checking limitations, allowing multiple DSP instances to reside efficiently in a single worker.Key Changes
1. High-Efficiency DSP Worker Pooling
navigator.hardwareConcurrency).audioBatchmessage, reducing the overhead of postMessage communication.2. Raw Pointer WASM API (
processor.rs)dsp_new/dsp_process_ptrAPI in Rust that uses raw heap pointers (Box::into_raw).DspProcessorinstances to exist within the same WASM module instance without triggeringWasmRefCellborrow errors, which previously necessitated separate workers for each instance.3. Decoupled Audio Mixer
setIntervalloop (50Hz).4. Remote Client Enhancements
Performance Impact