You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Surely this is a very inefficient way to determine if a string starts with another string, as potentially it will search a very large haystack to find a needle at the very end, or not at all, when all it cares about is if the needle is at the start.
And the remove_dot_segments function calls this 5 times per segment of each uri.
perhaps the following alternative would be better, as you do know the size of each prefix upfront.
Activity
glynos commentedon Dec 16, 2023
Thanks for the review. I think the approach to use the string_view is the best of the options you provide.
I am travelling and won't have the opportunity to address this until January. I would be able to review a PR if you can prepare one.