saltstack/salt — pull request #13537 by babilen (2014-06-18 14:25:50+00:00)
Title: Performance enhancement for Issues/#11877

There is no need to recompile the pattern for every line in the file. This version behaves identically, but moves the re.compile(pat) call out of the line comparison loop.