New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only create native engine resource when needed. #5649

Merged
merged 1 commit into from Apr 3, 2018

Conversation

Projects
None yet
2 participants
@jsirois
Copy link
Member

jsirois commented Apr 3, 2018

Previously, although the engine was only built when needed, the resource
embedded in the pantsbuild.pants wheel was always replaced on every
./pants run. When using the daemon, this led to un-necessary
invalidation work on every run. On my machine, this change dropped
~500ms from warm ./pants --enable-pantsd list :: runs.

A metadata header is now added to the native engine resource containing
its version to allow for ~robust replacement only when needed as well as
some additional sanity check logging of the native engine provenance.
With debug logging turned on, we now can read:

DEBUG] using engine_version: 992db34178f6647a7961ec3fadc9f0bb1f2d9747 built at repo_version: release_1.6.0.dev1-13-g39324e46d-dirty
DEBUG] loading native engine python module from: /tmp/tmpkMBxLs
Only create native engine resource when needed.
Previously, although the engine was only built when needed, the resource
embedded in the `pantsbuild.pants` wheel was always replaced on every
`./pants` run. When using the daemon, this led to un-necessary
invalidation work on every run. On my machine, this change dropped
~500ms from warm `./pants --enable-pantsd list ::` runs.

A metadata header is now added to the native engine resource containing
its version to allow for ~robust replacement only when needed as well as
some additional sanity check logging of the native engine provenance.
With debug logging turned on, we now can read:
```
DEBUG] using engine_version: 992db34178f6647a7961ec3fadc9f0bb1f2d9747 built at repo_version: release_1.6.0.dev1-13-g39324e46d-dirty
DEBUG] loading native engine python module from: /tmp/tmpkMBxLs
```
@jsirois

This comment has been minimized.

Copy link
Member

jsirois commented Apr 3, 2018

Discovered working #4558

@jsirois jsirois requested review from kwlzn and stuhood Apr 3, 2018

@kwlzn

kwlzn approved these changes Apr 3, 2018

@jsirois jsirois merged commit 69de80a into pantsbuild:master Apr 3, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jsirois jsirois deleted the jsirois:issues/4558/fix-native_engine.so-always-changes branch Apr 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment