gyurielf/svelte-tel-input

Component gets super slow when using Sentry Replay

rohanrajpal opened this issue · 3 comments

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)

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.

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.

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