We stuck your change into devenv.c. devproc.c was pretty bad too, since our cpu servers often have upwards of 300 procs. It was n**2 for ps which got unwieldy for a tool rob is building, so we added a hash table to proc.c to map pid to proctab slot. Time for ps of our cpu servers goes from 4 seconds to milliseconds. We'll include both changes in the next update wrap. We should probably rethink xxxgen, but for now we'll just speed up the high runners; even the proc.c hash was only a few lines of code. By the way, it's setting all the env's in your example that takes the time, not forking in rc. Rc doesn't reread the /env's. If you do an iostats on the example you'll see no opens of /env after setting the vars: % eval X^(`{seq 400})^('=1') % echo /env/*|wc 1 448 4443 % iostats rc % rfork e % time echo `{echo x | wc -c} 2 0.00u 0.00s 0.17r echo 2 % ^D read 157530 bytes, 9.022221 Kb/sec write 95 bytes, 1.325316 Kb/sec protocol 161425 bytes, 8.131304 Kb/sec rpc 128 count Message Count Low High Time Averg in out clone 17 0 0 0 0 ms 119 85 bytes walk 30 0 297 1092 36 ms 990 338 bytes open 9 32 469 1142 126 ms 54 117 bytes read 50 0 13593 17051 341 ms 750 157930 bytes write 5 1 62 70 14 ms 175 35 bytes clunk 14 0 16 31 2 ms 70 70 bytes stat 2 0 1 1 0 ms 10 242 bytes attach 1 0 0 0 0 ms 146 26 bytes Opens Reads (bytes) Writes (bytes) File 2 9 28100 0 0 /bin/echo 1 3 36 0 0 (stdin) 1 0 0 1 2 (stdout) 1 0 0 4 93 (stderr) 1 2 579 0 0 /rc/lib/rcmain 1 23 87864 0 0 /bin/rc 1 6 18680 0 0 /bin/time 1 7 22271 0 0 /bin/wc %