saltstack/salt — pull request #3223 by MTecknology (2013-01-10 19:56:50+00:00)
Title: Changed modules to keep from making excessive and redundant calls...

modules/groupadd.py && modules/groupadd.py:
This module is currently calling a grp.getgrnam against each item returned by grp.getgrall. grp.getgrall() already returns all the data that's available via grp.getgrnam(name). The only thing this call to info() accomplishes is adding a large amount of wait time. We have a few thousand groups in our organization and this brings the getent() function from a short 1-2 seconds to a long 30+ seconds for every single group.present state.

This patch simply removes the additional call for each entity. The formatting is kept the same so everything that relies on this piece of code will keep working without noticing the difference.