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

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

nhoward_tw
pants
3302
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

JS
  1. Ship It!
  2. 
      
BE
  1. Ship It!
  2. 
      
MO
  1. Ship It!
  2. 
      
ST
  1. Ship It!
  2. 
      
NH
NH
Review request changed

Status: Closed (submitted)

Change Summary:

committed to master @ c5a2e6d30f17e3fb1f559e89071c09db63e79f35

Loading...