-
-
Notifications
You must be signed in to change notification settings - Fork 643
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
) Recent profiles (from #18911, and reproduced locally) highlighted: * `FieldSet.create` was repeatedly calling the unmemoized `_get_field_set_fields`, which used the surprisingly expensive `from typing import get_type_hints`. * This change moves type hint extraction into a memoized property. * `Target.has_fields` was doing an N^2 lookup of fields in a computed collection of registered fields. * Moved to using the `field_values` `dict` to represent the set of present fields, and removed the `plugin_fields` property (which is always incorporated into the `field_values` at construction time anyway). ---- Performance for `./pants --no-pantsd dependencies ::` in `pantsbuild/pants` improves by 9% (or 15%, if the time for rule graph solving is ignored). --------- Co-authored-by: Stu Hood <stuhood@gmail.com>
- Loading branch information
Showing
5 changed files
with
57 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters