saltstack/salt — pull request #2791 by dekkers (2012-12-04 00:20:52+00:00)
Title: Only refresh the modules when state changed

We used to refresh all the modules with every execution of a pkg state, even when nothing had changed. With this change we only refresh the module if the state has changed anything.

This results in a 2x speedup of highstate runs that don't change anything. Together with the speedup of the recent change in fileclient (the one uses __context__), the time it takes to run highstate went from 8 to 2 seconds on a minion I benchmarked.