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

feat: use std::threads for encoding / transcoding operations #6

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

okwasniewski
Copy link
Member

Summary

This PR adds usage of std::threads to offload the work from JS thread.

Before

(Notice the load on JS Thread)

CleanShot 2024-11-13 at 15 16 22@2x

After

CleanShot 2024-11-13 at 15 17 37@2x

Test plan

Run benchmarks

@thymikee
Copy link
Member

thymikee commented Nov 13, 2024

The total spikes go from 600% to 1000%. Is this indicative of more threads being actually used (like on desktop CPU usage)? Regarding js thread the difference is staggering, nice work

@okwasniewski
Copy link
Member Author

The total spikes go from 600% to 1000%. Is this indicative of more threads being actually used (like on desktop CPU usage)? Regarding js thread the difference is staggering, nice work

Yeah, exactly! Before we had 6 threads (6x100%) now we have total of 10 (10x100%) 👍🏻

@okwasniewski okwasniewski merged commit 6a4a33d into main Nov 14, 2024
5 checks passed
@thymikee thymikee deleted the feat/use-threads branch November 14, 2024 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants