Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parallelization #47

Open
Rudxain opened this issue Mar 8, 2024 · 2 comments
Open

parallelization #47

Rudxain opened this issue Mar 8, 2024 · 2 comments
Labels
perf Performance problem

Comments

@Rudxain
Copy link
Owner

Rudxain commented Mar 8, 2024

Right now, the main thread isn't the bottleneck, it's the API. But when users are allowed to set droplet speed, we'll need WebWorkers.

I'll have to benchmark before doing so, as the context API calls may be I/O bound rather than CPU-bound. Especially considering that droplets are rendered by repeatedly drawing individual chars, rather than drawing batches of chars

@Rudxain Rudxain added the perf Performance problem label Mar 8, 2024
@Rudxain
Copy link
Owner Author

Rudxain commented Mar 8, 2024

If I RIIR before this, I should remember that std::thread can only be emulated by wasm_thread, so WebWorkers are the only stable way

@Rudxain
Copy link
Owner Author

Rudxain commented Mar 8, 2024

I expect that WebGL auto-distributes workload across GPU cores, so there's no need for WebWorkers to handle slices of the Canvas, as that would require multiple API calls (counterproductive)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf Performance problem
Projects
None yet
Development

No branches or pull requests

1 participant