pantsbuild/pants — pull request #775 by baroquebobcat (2014-11-06 22:49:21+00:00)
Title: inject Config most places it is used so that pants.ini isn't reparsed re...

...peatedly

Parsing the ini file isn't terribly expensive. However, it is parsed at least once for certain types of targets. When there are many BUILD files involved in completing a goal, parsing the ini file may be a significate portion of pants execution time.

This change reduces the number of times pants.ini is parsed by injecting a Config object as an argument to most of the scopes where it would otherwise be reparsed.
In cases where config was optional, it makes it required.
It also exposes it as a property of ParseContext so that objects registered by wrappers can also avoid having to reparse.

This makes it possible to improve the behavior found in this issue https://github.com/pantsbuild/pants/issues/565