Thanks for the suggestion.
We redefine ENV to a hash array instead of the standard char **environ, which should give better performance. It only happen once during LSAPI initialization.
I am not sure what you suggested works or not, will give it a try when I got a chance.