Open nerdvegas opened 9 years ago
I have some code which could be adapted to do this - we already go one further and actually flatten the path completely.
We ran into issues were our LD_LIBRARY_PATH
is over 4096 which causes a hard crash in Maya. Now we 'flatten' configured variables into a temporary folder, reducing the variable to one item. It improves performance of the underlying applications (particularly Python as filesystem stats are greatly reduced ~50%) and inherently removes duplicates and empty paths.
It could easily be adapted to either flatten or just clean.
Add configurable list of environment variables that rez should 'clean' when a context is created. Cleaning involves removing duplicate paths (retaining first appeared path), and removing empty paths.