CB-7060 WP8. Fix large project build performance issue

https://issues.apache.org/jira/browse/CB-7060