Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@guizmaii
Copy link
Member

No description provided.

@guizmaii guizmaii self-assigned this Apr 22, 2025
val builder: ChunkBuilder[Out] = ChunkBuilder.make[Out](chunk.size)
val iterator: Iterator[In] = chunk.iterator
val builder: ChunkBuilder[Out] = ChunkBuilder.make[Out](size)
val iterator = chunk.chunkIterator
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL about ChunkIterator

image

@guizmaii guizmaii force-pushed the opt_mapEitherChunked branch from 1c4d37d to 22a99e2 Compare April 22, 2025 10:20
chunk => {
val size = chunk.size

if (size == 0) reader
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In another PR, we were talking about the fact that this Chunk can probably never be empty

@guizmaii guizmaii requested review from ghostdogpr, hearnadam and kyri-petrou and removed request for ghostdogpr April 22, 2025 10:22
@guizmaii guizmaii force-pushed the opt_mapEitherChunked branch from 22a99e2 to 45d3afa Compare April 22, 2025 10:22
while (iterator.hasNext && (error == null)) {
val a = iterator.next()
f(a) match {
while (iterator.hasNextAt(index) && (error == null)) {
Copy link
Contributor

@kyri-petrou kyri-petrou Apr 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm 99.99% sure that if you have size already stored locally you can simply iterate by checking index < size without having to call hasNextAt(index)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Sorry for the delay

@kyri-petrou
Copy link
Contributor

@guizmaii happy to merge it once you apply my recommendation above :)

@guizmaii guizmaii requested a review from kyri-petrou July 29, 2025 05:43
@guizmaii
Copy link
Member Author

@guizmaii happy to merge it once you apply my recommendation above :)

@kyri-petrou Done! Sorry for the delay

@guizmaii guizmaii enabled auto-merge (squash) August 5, 2025 04:33
@guizmaii guizmaii disabled auto-merge August 22, 2025 03:30
@guizmaii guizmaii merged commit b1cde70 into series/2.x Aug 22, 2025
19 checks passed
@guizmaii guizmaii deleted the opt_mapEitherChunked branch August 22, 2025 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants