fasrc/slurm_showq — pull request #6 by chrissamuel (2014-03-06 05:15:08+00:00)
Title: Make Slurm_Showq::uid_to_string() use a cache

Currently the Slurm_Showq::uid_to_string() function calls getpwuid()
for every lookup, and loops through all jobs multiple times.

Instead we use a std::map to build a cache that maps user IDs to users.

This resulted in a 73X speedup on the login node of one of our Intel
clusters with over 900 jobs in the queue, going from 22 seconds to
0.3 seconds.