Commit 57914e8
committed
Stream SIRI-ET initial data HTTP response directly into XML parser
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.1 parent 1158ac0 commit 57914e8
1 file changed
Lines changed: 9 additions & 12 deletions
File tree
- application/src/main/java/org/opentripplanner/updater/trip/siri/updater/google
Lines changed: 9 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
| 268 | + | |
269 | 269 | | |
270 | | - | |
| 270 | + | |
271 | 271 | | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
| 272 | + | |
| 273 | + | |
278 | 274 | | |
279 | 275 | | |
280 | 276 | | |
| |||
299 | 295 | | |
300 | 296 | | |
301 | 297 | | |
302 | | - | |
| 298 | + | |
303 | 299 | | |
304 | | - | |
| 300 | + | |
305 | 301 | | |
306 | 302 | | |
307 | | - | |
| 303 | + | |
308 | 304 | | |
309 | 305 | | |
310 | 306 | | |
311 | | - | |
| 307 | + | |
312 | 308 | | |
| 309 | + | |
313 | 310 | | |
314 | 311 | | |
315 | 312 | | |
| |||
0 commit comments