Stream SIRI-ET initial data HTTP response directly into XML parser#7501
Merged
vpaturet merged 1 commit intoopentripplanner:dev-2.xfrom Apr 13, 2026
Merged
Conversation
Instead of buffering the entire HTTP response (~325-580 MB) into a ByteString before parsing, stream the response body directly into SiriXml.parseXml() via StAX. This eliminates a large short-lived allocation that contributes to GC pressure during startup. The streaming pattern is already used by SiriAzureUpdater and SiriFmDataSource.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #7501 +/- ##
==========================================
Coverage 71.02% 71.03%
- Complexity 21002 21006 +4
==========================================
Files 2352 2352
Lines 87266 87265 -1
Branches 8635 8635
==========================================
+ Hits 61983 61986 +3
+ Misses 22293 22292 -1
+ Partials 2990 2987 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jessicaKoehnke
approved these changes
Apr 10, 2026
habrahamsson-skanetrafiken
approved these changes
Apr 10, 2026
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.
Summary
Stream the SIRI-ET PubSub initial data HTTP response directly into the StAX/JAXB XML parser instead of buffering the entire payload into a
ByteString.This eliminates a ~325 MB (TST) / ~580 MB (PRD) short-lived allocation that contributes to GC pressure during startup. The
SiriXml.parseXml(InputStream)parser already supports streaming viaXMLStreamReader, and this pattern is already used bySiriAzureUpdaterandSiriFmDataSource.Before
After
Unit tests
No unit tests, tested manually.
Documentation
No documentation changes needed — no new configuration options or public API changes.