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

Component gets super slow when using Sentry Replay #192

Open
rohanrajpal opened this issue Aug 15, 2023 · 3 comments
Open

Component gets super slow when using Sentry Replay #192

rohanrajpal opened this issue Aug 15, 2023 · 3 comments
Labels
question Further information is requested wontfix This will not be worked on

Comments

@rohanrajpal
Copy link

Hey

Thanks a lot for this amazing component! Has made my life so much easier.

I noticed that after we setup sentry yesterday, and particularly this snippet of code

// hooks.client.ts
import { PUBLIC_ENV } from '$env/static/public';
import { version } from '$app/environment';

import * as Sentry from '@sentry/sveltekit';

Sentry.init({
    dsn: <elided>,

    // We recommend adjusting this value in production, or using tracesSampler
    // for finer control
    tracesSampleRate: 1.0,

    // Optional: Initialize Session Replay:
    integrations: [new Sentry.Replay()], --> if i comment this, the component is fast again!
    replaysSessionSampleRate: 0.1,
    replaysOnErrorSampleRate: 1.0,

    environment: PUBLIC_ENV,
    release: version,
});

export const handleError = Sentry.handleErrorWithSentry();

when initialized, makes the country selection section to be super duper slow, i'm baffled as to why is this happening

if you feel this is more of a sentry issue, I shall report it there and close this issue, a relevant discussion would be getsentry/sentry-javascript#5838 (comment)

@gyurielf
Copy link
Owner

gyurielf commented Aug 15, 2023

Hello there!

You're welcome.

Well, it shouldn't be the issue of the select itself. That's not really complicated and everybody could do his own.
I tried to make it customizable as much as possible.
However, I checked the sentry replay session feature and as I see it's "hide" texts and fields.
The example component country select makes ~250 elements when you open it.
IMO Sentry is try to hide all those elements textContent.

@rohanrajpal
Copy link
Author

Hello there!

You're welcome.

Well, it shouldn't be the issue of the select itself. That's not really complicated and everybody could do his own. I tried to make it customizable as much as possible. However, I checked the sentry replay session feature and as I see it's "hide" texts and fields. The example component country select makes ~250 elements when you open it. IMO Sentry is try to hide all those elements textContent.

Ah, makes sense. Yes that can slow things down, I shall report this issue on Sentry then.

@gyurielf
Copy link
Owner

Hello there!
Is there any update ?
I'm just curious :)

@gyurielf gyurielf added question Further information is requested wontfix This will not be worked on labels Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants