tulip / oplogtoredis

Publish MongoDB oplog entries to Redis
Apache License 2.0
38 stars 9 forks source link

Use a leaky buffer instead of allocating a new redisPub for every oplog message #2

Open benweissmann opened 6 years ago

benweissmann commented 6 years ago

We can use a technique like https://golang.org/doc/effective_go.html#leaky_buffer instead of allocating a new redisPub for each oplog message. Need to benchmark to determine the actual performance improvement.

See: https://github.com/tulip/oplogtoredis/blob/85ebc4bca6b50f572160cdba078c910ebdd89c0b/main.go#L39