-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
batcher for performance improvements #12
base: dev
Are you sure you want to change the base?
Conversation
batcher.onMessage(message.toRawMessage( | ||
connectionId, | ||
direction, | ||
(if (direction == Direction.FIRST) incomingSequence else outgoingSequence)() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(if (direction == Direction.FIRST) incomingSequence else outgoingSequence)() | |
(if (direction == Direction.FIRST) incomingSequence else outgoingSequence).invoke() | |
For readability
|
||
val batcher = RawMessageBatcher(settings.maxBatchSize, settings.maxFlushTime, { | ||
it.metadataOrBuilder.id.direction | ||
}, scheduledExecutorService, messageRouter::send).also { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
messageRouter::send
We've lost passing of attribute here
@@ -190,7 +208,9 @@ data class Settings( | |||
val handlerSettings: IHandlerSettings? = null, | |||
val grpcStartControl: Boolean = false, | |||
val autoStart: Boolean = true, | |||
val autoStopAfter: Int = 0 | |||
val autoStopAfter: Int = 0, | |||
val maxBatchSize: Int = 100, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make it a 1000
@@ -1,5 +1,6 @@ | |||
kotlin.code.style=official | |||
kotlin_version=1.4.10 | |||
release_version=0.3.1 | |||
slf4j_version=1.7.32 | |||
release_version=0.3.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bump minor version instead since there was an extension of functionality
No description provided.