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

High memory usage issue #563

Closed
alexisbar opened this issue Oct 17, 2022 · 2 comments
Closed

High memory usage issue #563

alexisbar opened this issue Oct 17, 2022 · 2 comments

Comments

@alexisbar
Copy link

alexisbar commented Oct 17, 2022

Hello,

I faced a memory issue in my app that is related to MixPanel's swift SDK.
This has been really visible when I started using an extension, as the memory limit is really low in these lands. (24Mb for a Notification Service Extension)
After some debugging I found that it was due to a call that was made upon each process launch:

Mixpanel.mainInstance().people.unset(properties: ["myAwesomeProperty"])

When receiving a lot of notification in a row, this was causing my extension to hit the memory limit.

This is easily reproductible in any application by implementing these lines of code:

for _ in 1...10000 {
    Mixpanel.mainInstance().people.unset(properties: ["myAwesomeProperty"])
}

When triggered upon app launch, this causes a really high memory usage

Capture d’écran 2022-10-17 à 14 51 05

iOS 16
Mixpanel-swift (4.0.2) installed via cocoa pods

@adamwulf
Copy link
Contributor

adamwulf commented Feb 1, 2023

I'm seeing the same issue. When offline and tracking many events, the memory grows significantly.

@zihejia
Copy link
Contributor

zihejia commented Mar 24, 2023

hi @adamwulf , your fix has been merged and is in 4.1.0. Thanks so much again! I'm closing this one now. Feel free to reopen it anytime.

@zihejia zihejia closed this as completed Mar 24, 2023
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

No branches or pull requests

3 participants