perf: avoid unnecessary sorting of lookup paths when resolving a request
What does this MR do?
This was discovered while trying to reduce allocations (sort.Slice
takes an interface which makes the slice escape to the heap) but has the nice side effect of improved performance and better scaling of lookup paths.
TODO
-
I added the Changelog
trailer (e.g.Changelog: added
) to the commits that need to be included in the changelog -
I added unit tests or they are not required -
I added acceptance tests or they are not required -
I added documentation (or it's not required) -
I followed code review guidelines -
I followed Go Style guidelines
Edited by feistel