Mass Aliases to the same target make the parser extremely slow
Having many aliases with little overlap parses fine: it is basically instant parsing 30 thousand aliases with different target paths.
alias /bin/hello -> /test/bin00001/hello,
alias /bin/ls -> /test/bin00002/ls,
alias /bin/which -> /test/bin00003/which,
...
alias /bin/dd -> /test/bin29999/dd,
alias /bin/cat -> /test/bin30000/cat,
profile hello /bin/hello {
...
}
This is not a problem: it parses fine, and it parses quickly.
However, it is extremely slow parsing aliases with intersecting target path. Take following example with 10x less aliases, but all of them intersecting:
alias /bin -> /test/bin0001,
alias /bin -> /test/bin0002,
alias /bin -> /test/bin0003,
...
alias /bin -> /test/bin2999,
alias /bin -> /test/bin3000,
profile hello /bin/hello {
...
}
This will take LONG to parse, we are talking close to 30 minutes per profile.
This is a problem i came across while trying to find a workaround for #455 and i believe this should also be addressed. It might seem nonsensical to use this many aliases, but in my application of NixOS where essentially every package has its own file system structure it'd make sense to alias them all together to treat all the packages at once.