TheThingsArchive / ttn

The Things Network Stack V2
https://www.thethingsnetwork.org
MIT License
461 stars 276 forks source link

Miscellaneous router optimizations #785

Closed adriansmares closed 4 years ago

adriansmares commented 4 years ago

Summary

This PR introduces a series of optimizations both in shared component code and in the router.

Changes

Testing

Unit tests.

Notes for Reviewers

We save 4 goroutines per gateway with this PR, which in large deployments amounts to about 20% less goroutines (wrt total amount per instance). This allows us to save a significant amount of memory and CPU costs.

This targets update/deps in order to separate the changes.

Checklist