This repository has been archived by the owner on Aug 30, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 32
fix: do not lookup sentry-debug-meta but instead load it directly #445
Merged
marandaneto
merged 6 commits into
getsentry:master
from
marandaneto:fix/slow-assets-manager
Jun 3, 2020
Merged
fix: do not lookup sentry-debug-meta but instead load it directly #445
marandaneto
merged 6 commits into
getsentry:master
from
marandaneto:fix/slow-assets-manager
Jun 3, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ad it directly by the asset manager
marandaneto
changed the title
fix/slow assets manager
fix: do not lookup sentry-debug-meta but instead loads it directly
Jun 3, 2020
12 tasks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All minor comments except for two important ones.
Good bet with just opening the asset and not checking if it exists. I guess the downside with catching the exception is not going to slow us down that much. I think it is a good tradeoff.
sentry-android-core/src/main/java/io/sentry/android/core/DefaultAndroidEventProcessor.java
Outdated
Show resolved
Hide resolved
sentry-android-core/src/main/java/io/sentry/android/core/DefaultAndroidEventProcessor.java
Outdated
Show resolved
Hide resolved
sentry-android-core/src/main/java/io/sentry/android/core/DefaultAndroidEventProcessor.java
Outdated
Show resolved
Hide resolved
sentry-android-core/src/main/java/io/sentry/android/core/DefaultAndroidEventProcessor.java
Outdated
Show resolved
Hide resolved
sentry-android-core/src/main/java/io/sentry/android/core/DefaultAndroidEventProcessor.java
Outdated
Show resolved
Hide resolved
sentry-android-core/src/main/java/io/sentry/android/core/DefaultAndroidEventProcessor.java
Outdated
Show resolved
Hide resolved
sentry-android-core/src/main/java/io/sentry/android/core/DefaultAndroidEventProcessor.java
Outdated
Show resolved
Hide resolved
philipphofmann
changed the title
fix: do not lookup sentry-debug-meta but instead loads it directly
fix: do not lookup sentry-debug-meta but instead load it directly
Jun 3, 2020
…ltAndroidEventProcessor.java Co-authored-by: Philipp Hofmann <[email protected]>
bruno-garcia
approved these changes
Jun 3, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📢 Type of change
📜 Description
fix: do not lookup sentry-debug-meta but instead loads it directly
💡 Motivation and Context
probably fixes #442
one may have thousands of asset files and this will slow down the startup time.
instead of looking up if the sentry-debug-meta exists, we try to load it directly and take care of
FileNotFoundException
.the downside is: if one doesn't have asset files, catching the exception might be more expensive than the looking up itself, but worth it.
💚 How did you test it?
running it, tests are in place.
📝 Checklist
🔮 Next steps
ideally
sentry-debug-meta.properties
will be a manifest config or SentryOptions, as a file this is suboptimal, but needed because of retro compatibility.