We did not do any real testing, but i spend a while thinking about this. I'd say it depends a lot on different factors, mainly two seem relevant to me:
- How you define and structure your packages
- How you scope your environments/contexts
- How variables are actually set
- Where your packages are located and how you access them
So in regards to the first part, there are different possibilities. You can just blindly append to PATH for every packages binary folder, you could try exposing just executables as seperate env vars (e.g. REZ_ENV_TOOLNAME_EXECUTABLE) instead of appending path etc etc. That is very dependent on the package type and in some cases the particular package. But there are also other factors playing a rather big role here. For example variants. Take python packages that come in variants for python version, architecture, os and VS version on windows (the latter being needed if you have binary extensions that need special compiles for nuke or maya).
This may result in the path added to PATH growing from this:
\\server\packages\package_name\1.0.0\
to this:
\\server\packages\package_name\1.0.0\python-2.7\platform-windows\arch-AMD64\os-windows-6.1.7601.SP1\msvc-9.0
The second is quite a big factor. What i mean by scope is "How many packages are in your environments". From what i read there seem to be quite some shops that have big environments. Say a single environment for a show. That means there would be a LOT of packages in there and the PATH variable (and PYTHON_PATH and possibly others) may
grow rather uncontrollably if you take dependencies into the mix etc. We are rather planning to have different contexts for different contexts (hah, contextception). So for example there would be separate contexts available for different tasks, rather than few monolithic contexts.This way the package count is way lower within environments/contexts.
The third part is something that we should definitely take a closer look at. Especially since some of the approaches currently taken also have side effects. PATH is currently taken from the registry for cmd, which means you can not override in an existing shell as local PATH changes are not written to the registry of course. For this issue though the main reason would be that you have different amounts of characters available depending on how you set the variables. I have not really spend any time on this yet though.
Our rez install is on a central server, we access it through a local symlink though. That can reduce the amount of characters per path quite a lot, also the path depth of your packages folder itself matters of course etc.
All in all, it is hard to make a general recommendation i guess. It is an issue though and some parts of rez (or rather the shell plugin for cmd) definitely need a closer look.
Cheers,
Thorsten