Speeding up jvm-platform-validate step.

Review Request #2626 - Created Aug. 14, 2015 and submitted

Information
Garrett Malmquist
pants
gmalmquist/jvm-platform-validate-performance
1981
59a56ae...
Reviewers
pants-reviews
jsirois, stuhood, zundel

Using self.invalidated mechanism, targets are only re-evaluated if
they (1) they failed previously, (2) their dependencies have changed,
or (3) their platform -target version has changed.

Additionally, pruned down the list of dependencies that must be
considered for each target. Instead of evaluating all transitive
JvmTarget dependencies, only consider the "direct" JvmTarget
dependencies. "Direct" is in quotes because I'm defining a JvmTarget
'A' as "directly" depending on a JvmTarget 'B' iff there exists a
path in the dependency graph from 'A' to 'B', and there are no
internal vertices in the path that are JvmTargets.

This behavior is documented in the jvm_dependency_map property.

This addresses https://github.com/pantsbuild/pants/issues/1972. It'd probably be good for someone with access to test this change against the repos which were previously experiencing slow-down from jvm-platform-validate, to make sure this patch actually solves the problem.

Manual testing implies caching is working as intended. Added a couple unit tests to test_jvm_platform_analysis.py. Everything passes locally.

CI went green: https://travis-ci.org/pantsbuild/pants/builds/75650551
CI went green: https://travis-ci.org/pantsbuild/pants/builds/75940854
CI went green: https://travis-ci.org/pantsbuild/pants/builds/76001873

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Eric Ayers
Garrett Malmquist
Stu Hood
Garrett Malmquist
Garrett Malmquist
Eric Ayers
Garrett Malmquist
Garrett Malmquist
Garrett Malmquist
Eric Ayers
Garrett Malmquist
Review request changed

Status: Closed (submitted)

Change Summary:

In commit 43df0378febb1fc8366243d321e01ef833c3265f

Loading...