After profiling I noticed that it was spending a ton of time in strings.Trim() so I reworked it a little bit to iterate over the runes (int32 char value) instead of using convenience functions in the strings lib. Subsequent profiling and pidstat monitoring looks much better. There is still a lot of room for improvement, but this is an incremental improvement.
After profiling I noticed that it was spending a ton of time in strings.Trim() so I reworked it a little bit to iterate over the runes (int32 char value) instead of using convenience functions in the strings lib. Subsequent profiling and pidstat monitoring looks much better. There is still a lot of room for improvement, but this is an incremental improvement.