-
-
Notifications
You must be signed in to change notification settings - Fork 474
perf(core): SDK Overhead Reduction #5499
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
Merged
+1,252
−114
Merged
Changes from 28 commits
Commits
Show all changes
78 commits
Select commit
Hold shift + click to select a range
81d2815
collection: SDK Overhead Reduction
adinauer b5a0b0c
perf(core): Skip java.specification.version lookup on Android
adinauer 7b15a6c
perf(android): Replace reflective OptionsContainer with direct subclass
adinauer 51c339c
collection: SDK Overhead reduction for JVM
adinauer 841a12e
perf(core): Short-circuit combined scope breadcrumbs
adinauer 781e282
perf(core): Reduce envelope writer buffer size
adinauer 5ce5a40
changelog
adinauer 247f786
perf(core): Remove redundant event map copies
adinauer 45c641c
changelog
adinauer bc6d4c8
Merge pull request #5536 from getsentry/perf/sdk-overhead-jvm-map-cop…
adinauer 3c0b021
Merge branch 'perf/sdk-overhead-jvm-v2' into perf/sdk-overhead-jvm-wr…
adinauer 60e4562
Merge pull request #5544 from getsentry/perf/sdk-overhead-jvm-writer-…
adinauer 22fe488
Merge remote-tracking branch 'origin/perf/sdk-overhead-jvm-v2' into p…
adinauer c8f48ac
changelog
adinauer 6e98fdf
perf(core): Short-circuit combined scope collections
adinauer 5850ef7
changelog
adinauer 934f189
Merge pull request #5541 from getsentry/perf/sdk-overhead-jvm-breadcr…
adinauer 948b64a
Merge pull request #5500 from getsentry/perf/sdk-overhead-reduction-p…
adinauer 06fb38b
Merge pull request #5501 from getsentry/perf/sdk-overhead-reduction-o…
adinauer 093c050
perf(android): Use TimeZone.getDefault for device timezone
adinauer d2ebaed
perf(core): Replace Calendar with Date in DateUtils
adinauer 6755ac1
perf(core): Reduce JsonWriter stack allocation
adinauer dc1ae1e
perf(core): Lazily allocate Breadcrumb data
adinauer 3b13f34
perf(core): Reduce context serialization allocations
adinauer e569b6f
perf(core): Lazily allocate reflection serializer state
adinauer fd46dbe
perf(core): Lazily create reflection JSON serializer
adinauer 2bcedec
fix(android): Preserve locale timezone extension
adinauer d3f5ecf
perf(core): Replace ISO8601 timestamp handling
adinauer fb38dbe
ref(core): Move ISO8601 utility to vendor package
adinauer 2b933d6
perf(core): Avoid cloning Date getters
adinauer 9174e18
fix(core): Preserve ISO8601 utility compatibility
adinauer 11fd621
fix(core): Preserve mutable breadcrumb data access
adinauer 9ac735a
docs(android): Explain timezone Calendar fallback
adinauer 200bec9
fix(core): Avoid KeySetView in context serialization
adinauer 3f09b42
test(core): Add breadcrumb timestamp serialization coverage
adinauer 62a5a41
fix(core): Parse date-only timestamps with timezones
adinauer 92262a2
docs(core): Add timezone changelog entry
adinauer 6dc1c41
docs(core): Add DateUtils changelog entry
adinauer f3cf22c
docs(core): Add JsonWriter changelog entry
adinauer 2a32beb
docs(core): Add breadcrumb changelog entry
adinauer e3e0df8
docs(core): Add contexts changelog entry
adinauer 30db42a
docs(core): Add reflection state changelog entry
adinauer 75cf8d2
docs(core): Add reflection serializer changelog entry
adinauer 1145788
docs(core): Add ISO8601 handling changelog entry
adinauer 321d84d
docs(core): Add Date getter changelog entries
adinauer 47fc854
Merge remote-tracking branch 'origin/main' into perf/sdk-overhead-red…
adinauer 4d4cafd
Merge remote-tracking branch 'origin/perf/sdk-overhead-reduction' int…
adinauer 0678c5b
Merge remote-tracking branch 'origin/perf/sdk-overhead-reduction' int…
adinauer e2dcca5
Merge remote-tracking branch 'origin/perf/sdk-overhead-reduction' int…
adinauer 3d2fab5
Merge remote-tracking branch 'origin/perf/sdk-overhead-reduction' int…
adinauer 7e885d1
Merge remote-tracking branch 'origin/perf/sdk-overhead-reduction' int…
adinauer f013263
Merge remote-tracking branch 'origin/perf/sdk-overhead-reduction' int…
adinauer b34e7d2
Merge remote-tracking branch 'origin/perf/sdk-overhead-reduction' int…
adinauer e0e4cde
Merge remote-tracking branch 'origin/perf/sdk-overhead-reduction' int…
adinauer 826b55c
Merge remote-tracking branch 'origin/perf/sdk-overhead-reduction' int…
adinauer 385411f
Merge remote-tracking branch 'origin/perf/sdk-overhead-reduction-fast…
adinauer cd17726
Merge pull request #5587 from getsentry/perf/sdk-overhead-reduction-t…
adinauer 0054a67
Merge branch 'perf/sdk-overhead-reduction' into perf/sdk-overhead-red…
adinauer 4ec0df2
Merge pull request #5589 from getsentry/perf/sdk-overhead-reduction-d…
adinauer e963ad5
Merge branch 'perf/sdk-overhead-reduction' into perf/sdk-overhead-red…
adinauer 9766b74
Merge pull request #5591 from getsentry/perf/sdk-overhead-reduction-j…
adinauer 5fd3d03
Merge branch 'perf/sdk-overhead-reduction' into perf/sdk-overhead-red…
adinauer b070303
Merge pull request #5598 from getsentry/perf/sdk-overhead-reduction-b…
adinauer 507d84e
Merge branch 'perf/sdk-overhead-reduction' into perf/sdk-overhead-red…
adinauer f0276a6
Merge pull request #5599 from getsentry/perf/sdk-overhead-reduction-c…
adinauer 05d60fb
Merge branch 'perf/sdk-overhead-reduction' into perf/sdk-overhead-red…
adinauer 307853f
Merge pull request #5600 from getsentry/perf/sdk-overhead-reduction-r…
adinauer 6a7e061
Merge branch 'perf/sdk-overhead-reduction' into perf/sdk-overhead-red…
adinauer 69edcfa
Merge pull request #5601 from getsentry/perf/sdk-overhead-reduction-r…
adinauer 5534d0f
Merge remote-tracking branch 'origin/perf/sdk-overhead-reduction' int…
adinauer 201b68e
Merge remote-tracking branch 'origin/perf/sdk-overhead-reduction' int…
adinauer e839983
Merge pull request #5602 from getsentry/perf/sdk-overhead-reduction-f…
adinauer 7399716
Merge pull request #5609 from getsentry/perf/sdk-overhead-reduction-i…
adinauer 78e8755
Merge branch 'perf/sdk-overhead-reduction' into perf/sdk-overhead-red…
adinauer 7ae0823
Merge pull request #5603 from getsentry/perf/sdk-overhead-reduction-d…
adinauer 21c3d50
Merge branch 'perf/sdk-overhead-reduction' into perf/sdk-overhead-jvm-v2
adinauer 7e399ae
Merge pull request #5535 from getsentry/perf/sdk-overhead-jvm-v2
adinauer 8400bdf
changelog
adinauer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
16 changes: 16 additions & 0 deletions
16
sentry-android-core/src/main/java/io/sentry/android/core/SentryAndroidOptionsContainer.java
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| package io.sentry.android.core; | ||
|
|
||
| import io.sentry.OptionsContainer; | ||
| import org.jetbrains.annotations.NotNull; | ||
|
|
||
| /** | ||
| * Direct OptionsContainer for SentryAndroidOptions that avoids reflective | ||
| * getDeclaredConstructor().newInstance() on the Android startup path. | ||
| */ | ||
| final class SentryAndroidOptionsContainer extends OptionsContainer<SentryAndroidOptions> { | ||
|
|
||
| @Override | ||
| public @NotNull SentryAndroidOptions createInstance() { | ||
| return new SentryAndroidOptions(); | ||
| } | ||
| } |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,40 @@ | ||
| package io.sentry; | ||
|
|
||
| import com.jakewharton.nopen.annotation.Open; | ||
| import io.sentry.util.Objects; | ||
| import java.lang.reflect.InvocationTargetException; | ||
| import org.jetbrains.annotations.ApiStatus; | ||
| import org.jetbrains.annotations.NotNull; | ||
| import org.jetbrains.annotations.Nullable; | ||
|
|
||
| @ApiStatus.Internal | ||
| public final class OptionsContainer<T> { | ||
| @Open | ||
| public class OptionsContainer<T> { | ||
|
|
||
| public @NotNull static <T> OptionsContainer<T> create(final @NotNull Class<T> clazz) { | ||
| return new OptionsContainer<>(clazz); | ||
| } | ||
|
|
||
| private final @NotNull Class<T> clazz; | ||
| private final @Nullable Class<T> clazz; | ||
|
|
||
| private OptionsContainer(final @NotNull Class<T> clazz) { | ||
| super(); | ||
| this.clazz = clazz; | ||
| } | ||
|
|
||
| /** Constructor for subclasses that create the instance directly without reflection. */ | ||
| protected OptionsContainer() { | ||
| super(); | ||
| this.clazz = null; | ||
| } | ||
|
|
||
| public @NotNull T createInstance() | ||
| throws InstantiationException, | ||
| IllegalAccessException, | ||
| NoSuchMethodException, | ||
| InvocationTargetException { | ||
| return clazz.getDeclaredConstructor().newInstance(); | ||
| return Objects.requireNonNull(clazz, "OptionsContainer clazz is required") | ||
| .getDeclaredConstructor() | ||
| .newInstance(); | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.