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

Support RUM work on Web-Worker #2949

Open
miridih-chyoon opened this issue Aug 26, 2024 · 1 comment
Open

Support RUM work on Web-Worker #2949

miridih-chyoon opened this issue Aug 26, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@miridih-chyoon
Copy link

Hello,

In our project, moving GA-related operations to WebWorker has resulted in many performance improvements.
Datadog's RUM also seems to be using a lot of resources in the browser.
Is it possible to improve the RUM or logging related logic to work in WebWorker?
In Next.js, we use Partytown to make GTM work with Web-Worker, which improves performance.

@miridih-chyoon miridih-chyoon added the enhancement New feature or request label Aug 26, 2024
@BenoitZugmeyer
Copy link
Member

Hello,

The RUM Browser SDK collects a lot of data from APIs only available in the main thread global scope. Running the whole SDK inside a WebWorker would not work.

That being said, the SDK is already running some code in a Web Worker to avoid impacting the main thread for some operations.

Did you observe any specific part of the RUM SDK that "uses a lot of resources"? If you can share a Chrome profile we might be able to investigate and improve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants
@BenoitZugmeyer @miridih-chyoon and others