Iteratively skip containers in Ion Text reader#535
Iteratively skip containers in Ion Text reader#535popematt merged 2 commits intoamazon-ion:masterfrom
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #535 +/- ##
============================================
- Coverage 66.83% 66.82% -0.02%
+ Complexity 5393 5391 -2
============================================
Files 156 156
Lines 22734 22741 +7
Branches 4081 4082 +1
============================================
+ Hits 15195 15196 +1
- Misses 6243 6247 +4
- Partials 1296 1298 +2
☔ View full report in Codecov by Sentry. |
| final int CONTAINER_STACK_INITIAL_CAPACITY = 16; | ||
| final ArrayList<Integer> terminatorStack = new ArrayList<>(CONTAINER_STACK_INITIAL_CAPACITY); |
There was a problem hiding this comment.
Let's move this to the class level and just clear it upon entering this method, to avoid allocating a new one every time.
There was a problem hiding this comment.
I thought about that, but does that risk introducing thread-safety issues?
There was a problem hiding this comment.
Oh wait, we construct a new reader instance for each input source, so it wouldn't introduce any thread safety issues that aren't already present.
…e testing workflow
|
@0roman Please follow the Contribution Guidelines for security issues. If you are unable to reach us that way, you can contact us privately via the email address in our Maven artifacts (ion-team@amazon.com). |
|
Thanks, I will reach out via ion-team@amazon.com. |
|
@0roman FYI, I will delete some of your comments. We are not attempting to prevent discussion, but as mentioned, it is not the proper channel for this sort of thing. |
Issue #, if available:
None.
Description of changes:
Changes
skip_over_containerto use iteration instead of recursion.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.