garnet
garnet copied to clipboard
LightClientRequest very bad coding habit
Describe the bug
LightClientRequest is simple, but very import, and many code will be depend on it in the future. Your team should consider recoding this class by some experienced engineers, but not a student or a junior programmer. by simple reviewing the code, i found lots bad coding habits, for example: arbitrarily allocate array with "new", and concate string with "+".
Steps to reproduce the bug
1.just open LightClientRequest.cs
Expected behavior
consider to use ArrayPool and ReadOnlySpan
Screenshots
Release version
v1.08
IDE
No response
OS version
No response
Additional context
No response
Be the change you want see in the world and submit a PR 😉
Not every code fragment you see in a repo is part of what goes into production. There are usually prototypes, test code, code for benchmarking, etc. that are there to achieve narrow purposes. LightClient in particular is only used in this way. As Paulus mentions, happy to receive pull requests.