Skip to content
Merged
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
7 changes: 5 additions & 2 deletions osmpbf/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ func (dec *decoder) Start(n int) error {

dec.wg.Add(n + 2)

//use roughly 10 chanel inputs
numChanels := 10 / n

// High level overview of the decoder:
// The decoder supports parallel unzipping and protobuf decoding of all
// the header blocks. On goroutine feeds the headerblocks round-robin into
Expand All @@ -141,8 +144,8 @@ func (dec *decoder) Start(n int) error {

// start data decoders
for i := 0; i < n; i++ {
input := make(chan iPair, n)
output := make(chan oPair, n)
input := make(chan iPair, numChanels)
output := make(chan oPair, numChanels)

dd := &dataDecoder{scanner: dec.scanner}

Expand Down