saltstack/salt — pull request #3215 by MTecknology (2013-01-10 17:03:59+00:00)
Title: Changed groupadd.getent to not call a grp.getgrnam against each item returned by grp.getgrall

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.

... I know, a bit wordy for such a simple patch.