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(session-replay-browser): WebWorker support for compression #932

Merged
merged 5 commits into from
Dec 17, 2024

Conversation

lewgordon-amplitude
Copy link

@lewgordon-amplitude lewgordon-amplitude commented Dec 12, 2024

Summary

Adds experimental support for WebWorkers to offload compression. This is an initial first pass to see performance with hopefully later iterations being more complex and offloading not only compression, but other things such as networking calls.

To enable add to your local config:

{
  experimental: {
    useWebWorker: true
  }
}

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?:

@lewgordon-amplitude lewgordon-amplitude changed the title Webworkers feat(session-replay-browser): WebWorker support for compression Dec 12, 2024
Copy link

@jxiwang jxiwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM since this is behind a config flag, some questions -

  • When the worker fails for whatever reason, the events would essentially get dropped?
  • Do we need to add a limit to the amount of workers that can get spawned?

@lewgordon-amplitude
Copy link
Author

When the worker fails for whatever reason, the events would essentially get dropped?

Yeah I think as we investigate this we should see if there are ways to make it more resilient.

Do we need to add a limit to the amount of workers that can get spawned?

The goal I was thinking is 1 worker for 1 instance of session replay. So hopefully there are only a handful of these.

@lewgordon-amplitude lewgordon-amplitude merged commit 4ebe04a into v1.x Dec 17, 2024
5 checks passed
@lewgordon-amplitude lewgordon-amplitude deleted the webworkers branch December 17, 2024 19:21
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