Thanks, I've applied the performance patch 3 (with some necessary parts from earlier ones). However, I agree with Juanito, the mixed dir behavior is not desired.
Regarding patch 2, the idea in general is good - save on forks by looping inside tce-load. I see one possible issue with the current form, if (in an interactive shell, not on boot) the user has a spurious TCEDIR env var, that would cause tce-load to fail completely where it before wouldn't.
This can be worked around by only accepting TCEDIR when the booting flag is given, or perhaps by adding a new getopt option for the dir. I also think the other reorganization and error changes in the patch are not needed, or if perf impact can be shown for the reorganization, it should be a separate patch.