Skip to content

Commit

Permalink
client: prevent excessive gc
Browse files Browse the repository at this point in the history
  • Loading branch information
pulsejet committed Feb 10, 2025
1 parent cc0d342 commit 4bb53e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion std/object/client_produce.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func Produce(args ndn.ProduceArgs, store ndn.Store, signer ndn.Signer) (enc.Name
}

// force run GC every ~80MB to prevent excessive memory usage
if seg%10000 == 0 {
if seg > 0 && seg%10000 == 0 {
runtime.GC() // slow
}
}
Expand Down

0 comments on commit 4bb53e8

Please sign in to comment.