perf(core): [SDK Overhead Reduction 11] Replace ISO8601 timestamp handling#5602
Draft
adinauer wants to merge 2 commits into
Draft
perf(core): [SDK Overhead Reduction 11] Replace ISO8601 timestamp handling#5602adinauer wants to merge 2 commits into
adinauer wants to merge 2 commits into
Conversation
Replace the Calendar-backed vendored ISO8601 formatting and parsing path with a small Sentry-specific utility that works directly from epoch milliseconds. This avoids formatter and parser allocations on timestamp-heavy serialization paths while keeping the existing DateUtils API as the facade. Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Jun 23, 2026
Merged
📲 Install BuildsAndroid
|
Contributor
Performance metrics 🚀
|
Move the Sentry ISO8601 helper under the vendor package and mark it as internal API so the adapted public-domain date conversion code is isolated from core SDK classes. Update attribution metadata to reflect the public-domain dedication source. Co-Authored-By: Claude <noreply@anthropic.com>
8 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR Stack (SDK Overhead Reduction)
📜 Description
Replaces the vendored
ISO8601Utilstimestamp parsing and formatting path used byDateUtilswith a Sentry-specific ISO-8601 utility.The new utility parses supported Sentry timestamp formats directly to epoch milliseconds and formats epoch milliseconds directly to UTC ISO-8601 strings. Breadcrumb serialization also formats millisecond-backed timestamps directly instead of materializing a
Datefirst.💡 Motivation and Context
Timestamp parsing and formatting are used on hot serialization/deserialization paths. The existing vendored implementation creates
Calendarinstances and intermediate date objects. This change reduces allocation overhead while preserving the existingDateUtilsfacade and supported timestamp formats.💚 How did you test it?
./gradlew spotlessApply apiDump./gradlew :sentry:test --tests io.sentry.DateUtilsTest --tests io.sentry.protocol.BreadcrumbSerializationTest --tests io.sentry.JsonObjectReaderTest --tests io.sentry.JsonObjectSerializerTest📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
#skip-changelog