-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: reduce memory allocations (logger)
Rework the gRPC logger by using hand-rolled simple version, rework version parsing to remove regexp matching. The baseline (via benchmark): ``` BenchmarkViaClientSimulator-32 2934 387398 ns/op 101921 B/op 832 allocs/op ``` The baseline + removed logging middleware: ``` BenchmarkViaClientSimulator-32 3543 331166 ns/op 73581 B/op 543 allocs/op ``` Reworked logging middleware: ``` BenchmarkViaClientSimulator-32 3394 334066 ns/op 77985 B/op 568 allocs/op ``` Plus reworked version parsing: ``` BenchmarkViaClientSimulator-32 3510 325714 ns/op 66215 B/op 561 allocs/op ``` So overall, baseline to this PR: * allocs 101921 -> 66215 B/op * alloc ops 832 -> 561 allocs/op Signed-off-by: Andrey Smirnov <[email protected]>
- Loading branch information
Showing
13 changed files
with
181 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.