Use a set for the contains check in topo order path for invalidation

Review Request #3786 - Created April 29, 2016 and submitted

Information
Nick Howard (Twitter)
pants
3302
Reviewers
pants-reviews
benjyw, jsirois, molsen

I was doing some profiling of noop runs and noticed this linear search showing up fairly high when building targets with a closure of around 7k targets.

This creates a set and uses that as a look up table rather than retraversing the list for each target.

CI passed at https://travis-ci.org/pantsbuild/pants/builds/126737381

John Sirois
Benjy Weinberger
Matt Olsen
Stu Hood
Nick Howard (Twitter)
Nick Howard (Twitter)
Review request changed

Status: Closed (submitted)

Change Summary:

committed to master @ c5a2e6d30f17e3fb1f559e89071c09db63e79f35

Loading...