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

Move leak canary UI into leak process. #711

Merged
merged 1 commit into from
Jun 23, 2017
Merged

Conversation

JakeWharton
Copy link
Member

This ensures that isInAnalyzerProcess returns true for these elements thus preventing the normal Application behavior from affecting these components.

Closes #706.

This ensures that isInAnalyzerProcess returns true for these elements thus preventing the normal Application behavior from affecting these components.
@@ -49,6 +51,7 @@
<activity
android:theme="@style/leak_canary_Theme.Transparent"
android:name=".internal.RequestStoragePermissionActivity"
android:process=":leakcanary"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being mindful of the current OOM issues we've been seeing, it might be better to move these to yet another process. WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially was going to do that but it requires changes to the isInLeakProcess method. I'm sure it's not that difficult of a change to make though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking about this again, I'm not sure this is worth the effort. These two activities and services aren't large, but also they aren't going to be created concurrently while the leak analysis is occurring.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Profiled leakcanary-sample in Android Studio 2.4 preview 7 and launched using RequestStoragePermissionActivity using adb shell am. Turns out that while it eats some heap space in the com.example.leakcanary:leakcanary process, it's not as much as I thought.

image

:shipit:

@jrodbx
Copy link
Collaborator

jrodbx commented Mar 6, 2017

LGTM

@jrodbx jrodbx merged commit 7d0fece into master Jun 23, 2017
@jrodbx jrodbx deleted the jw/2017-02-27/process branch June 23, 2017 20:40
@jrodbx jrodbx modified the milestone: 1.6 Jun 30, 2017
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

Successfully merging this pull request may close these issues.

3 participants