-
Notifications
You must be signed in to change notification settings - Fork 1
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
Buffered channels #89
Conversation
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.
LGTM, is the size set based on experimenting / random / recommendation? I guess it will set the upper limit of memory usage that may be needed, any risk this might get too high?
internal/extractors/extract_data.go
Outdated
@@ -9,13 +9,15 @@ import ( | |||
// ExtractFunction is the type of the ExtractData function | |||
type ExtractFunction func(callback common.Callback, streamBatch ...StreamBatch) | |||
|
|||
const channelBufferSize int = 1000 |
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.
Nit-picking here, but are re there any cache chunk related reasons to think that 1024 might be better?
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.
OK, it looks better :)
@local-minimum: experimenting and guessing - yes, the application will use more heap - we're useing about 120Mb on my laptop (8cpus) |
Sorry guys I added one more optimization moved the image conversion into the go routine for encoding png. |
…into buffered-channels
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.
please undo these extra changes. They will directly conflict with my PR and the optimization here seems much lower priority to me.
Co-authored-by: Martin Zackrisson <[email protected]>
Using buffered channels since I noticed that the go routings spends a lot of time waiting for synchronization between channels. The value 1000 is a educated guess since I know one picture is about ~2000 rac-records. Innosat channel seems to be the limiting channel.