-
-
Notifications
You must be signed in to change notification settings - Fork 319
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
Always cold start if OOM tracking is disabled #2376
Comments
From our docs
What do you mean by consecutive boots? It's only a cold start if Sorry, I don't understand your problem, @WZBbiao. |
Sorry, I mean not reboot, but repeatedly killing/opening the app. |
If by killing you mean closing the process in the App Switcher, then yes, every start will be a cold start. |
However, by definition this is more like a cold start. |
Sorry @WZBbiao I dont get it? Can you describe the steps you are doing that you believe should not be a cold start? |
|
Once you remove the app from the App Switcher, you kill the process, and the app is no longer in memory. |
Ok, but according to my test, when other conditions remain unchanged, repeat launch demo app, when |
@WZBbiao, thank you for bringing this up, and thank you for the sample project. |
@philipphofmann @brustolin both of you seem the think that killing and restarting an app should be a cold start, but according to the code, it isn't: https://github.com/getsentry/sentry-cocoa/blob/master/Sources/Sentry/SentryAppStartTracker.m#L230-L261. It only uses the system's boot time, which doesn't change if you kill and restart the app. You can kill and restart the app all you like but the system boot time stays the same, and as such it's always reported as a warm start. Then there is the separate issue that this behaves differently when OOM tracking is disabled. This is a problem that should have been solved with #2276, I am now looking into this. |
OK, found the cause, but not sure why it behaves the way it does.
Now, because there is nothing else using the app state manager (OOM integration is not installed), this causes When you do have OOM installed, that stop method doesn't end up deleting the app state and everything works as expected. I don't think |
PR to fix the app state getting deleted: #2382. But the logic regarding warm/cold start is unchanged, it's all based app system boot time. |
Question for @philipphofmann: why does That seems very weird to me. I think we need to remove the call to |
Because we only want to build an appStartMeasurement once during the lifetime of the SDK.
But that's how it is currently. |
Sorry about the confusion. We want to stop the AppStartTracker but not the AppStateManager. |
Platform
iOS
Installed
CocoaPods
Version
7.29.0
Steps to Reproduce
disable OOM Tracking
SentrySDK.start { options in
options.dsn = "https://xxx.sentry.io/140"
options.enableOutOfMemoryTracking = false
}
test app start
Expected Result
In the case of non-first-time installation, several consecutive app start should be warm start.
Actual Result
Always cold start.
The text was updated successfully, but these errors were encountered: