Skip to content

Commit

Permalink
Merge pull request #300 from Consensys/299-tweak-buffered-channels
Browse files Browse the repository at this point in the history
Tweak channel buffers sizes
  • Loading branch information
DavePearce authored Sep 5, 2024
2 parents 519fbb2 + 07e4bc0 commit 4058fb1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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

0 comments on commit 4058fb1

Please sign in to comment.