Suggested by #1889
Currently, parsing is linear. We go through the route file one-by-one until we find a match. Additionally, we go through each repeated path segment multiple times- once for every time it is mentioned and reused. This is very slow.
Instead, we should create a trie datatype - Trie (Piece Text) - which can be used for more efficient parsing of the path pieces.
Suggested by #1889
Currently, parsing is linear. We go through the route file one-by-one until we find a match. Additionally, we go through each repeated path segment multiple times- once for every time it is mentioned and reused. This is very slow.
Instead, we should create a trie datatype -
Trie (Piece Text)- which can be used for more efficient parsing of the path pieces.