-
Notifications
You must be signed in to change notification settings - Fork 27
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
flushEvents CPU drain #231
Comments
The problem is here: posthog-android/posthog/src/main/java/com/posthog/internal/PostHogSendCachedEventsIntegration.kt Line 174 in 6185d73
listFiles contains only a replay-queue file, which fails to get deserialized into a PostHogEvent (result is null) which causes the later |
Hello @cvb941 thanks for the report. |
I checked the file, and it is empty (0 bytes) |
can you reproduce to actually write this file again as empty 0 bytes? if the bug is in the serialization, this should be addressed first. |
I have no idea how that happened. I just turned on my app in the emulator and noticed the cpu usage. After I deleted the empty file it didn't come back and the issue is not there. |
I tried to reproduce this issue and it does not happen at all. |
Version
3.11.3
Steps to Reproduce
Run on emulator, Initialize the SDK.
Expected Result
Minimal CPU usage
Actual Result
Function flushEvents is called in a loop forever. CPU usage gets high and triggers a lot of GCs.
The text was updated successfully, but these errors were encountered: