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

Amplitude & Angular - low performance #899

Open
grzegorzKniazuk opened this issue Oct 21, 2024 · 2 comments
Open

Amplitude & Angular - low performance #899

grzegorzKniazuk opened this issue Oct 21, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@grzegorzKniazuk
Copy link

Expected Behavior

The SDK shouldn't affect the overall performance of the application.

Current Behavior

The performance of our application dropped significantly after adding the Amplitude SDK. For example: just checking a checkbox takes a few seconds on mobile devices. Even the screen scrolling wasn't smooth. We have removed SDK and everything works smoothly now.

Steps to Reproduce

I haven't tried to reproduce this on another Angular project, so for now I'm adding a list of the dependencies we use in the project and class code what we use to integrate Amplitude. We import AmplitudeIntegrationModule directly into AppModule. We call init method on application start using the initializer.

asset1 asset2

Environment

  • JS SDK Version: 2.11.7
  • Installation Method: NPM
  • Browser and Version: Chrome 130
@grzegorzKniazuk grzegorzKniazuk added the bug Something isn't working label Oct 21, 2024
@Mercy811
Copy link
Contributor

Hi @grzegorzKniazuk, does the same issue happens when you open the page on a laptop browser? Could you try to turn element interactions off by init(apiKey, {autocapture. elementInteractions: false }) and turn autocapture off by ``init(apiKey, {autocapture: false })` and try again to see if reducing tracking events help?

@grzegorzKniazuk
Copy link
Author

No, I think there is no issue on laptop or high-end mobile devices. I have tested app on a few devices. For example: on Samsung S23+ I did not see any performance issues, but I saw it on Samsung A52 (I use mobile Chrome browser).

I have turned off elementInteractions and everything works fine now. Looks like this is the source of the performance drop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants