Skip to content
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

Tweak channel buffers sizes #300

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/cmd/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func validationCheck(tr trace.Trace, schema sc.Schema) error {

schemaCols := schema.Columns()
// Construct a communication channel for errors.
c := make(chan error, 10)
c := make(chan error, tr.Width())
// Check each column in turn
for i := uint(0); i < tr.Width(); i++ {
// Extract ith column
Expand Down
2 changes: 1 addition & 1 deletion pkg/schema/schemas.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func processConstraintBatch(batch uint, batchsize uint, iter util.Iterator[Const
var err error

n := uint(0)
c := make(chan error, 10)
c := make(chan error, 128)
stats := util.NewPerfStats()
// Launch at most 100 go-routines.
for ; n < batchsize && iter.HasNext(); n++ {
Expand Down
2 changes: 1 addition & 1 deletion pkg/trace/lt/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func FromBytes(data []byte) ([]trace.RawColumn, error) {
}
// Determine byte slices
offset := uint(len(data) - buf.Len())
c := make(chan util.Pair[uint, util.Array[fr.Element]], 100)
c := make(chan util.Pair[uint, util.Array[fr.Element]], ncols)
// Dispatch go-routines
for i := uint(0); i < uint(ncols); i++ {
ith := headers[i]
Expand Down