flat-zoo-31952
03/07/2022, 6:44 PMbitter-ability-32190
03/07/2022, 6:47 PMast
to parse the inputs.
The Pants rule code is here: https://github.com/pantsbuild/pants/blob/main/src/python/pants/backend/python/dependency_inference/parse_python_imports.py
and the parser is here:
https://github.com/pantsbuild/pants/blob/main/src/python/pants/backend/python/dependency_inference/scripts/import_parser.pypolite-garden-50641
03/07/2022, 6:48 PMhundreds-father-404
03/07/2022, 6:49 PMkeep in mind that pants also looks at strings literalsOnly if
[python-infer].strings
is trueflat-zoo-31952
03/07/2022, 6:49 PM./pants dependees ...
and timing thathundreds-father-404
03/07/2022, 6:50 PMdependees
, I strongly suspect https://github.com/pantsbuild/pants/issues/11270 is in playflat-zoo-31952
03/07/2022, 6:51 PMGet
for every little thing, I would suspect there's some resource contention at the scheduler levelbitter-ability-32190
03/07/2022, 6:51 PMpy-spy
https://github.com/benfred/py-spy to measure things. It's an awesome toolhundreds-father-404
03/07/2022, 6:52 PMI assume its something involving cache, IO, or task scheduler overhead,One source of overhead is determining the Python interpreter to parse the code with, which can be 0.25-2 seconds I believe. That does get memoized w/ pantsd, but not helpful on cold run. Instead, your script uses the interpreter its executed with
flat-zoo-31952
03/07/2022, 6:53 PMbitter-ability-32190
03/07/2022, 6:54 PMhundreds-father-404
03/07/2022, 6:56 PMflat-zoo-31952
03/07/2022, 6:57 PMwitty-crayon-22786
03/07/2022, 7:14 PMbitter-ability-32190
03/07/2022, 7:15 PMhappy-kitchen-89482
03/07/2022, 7:30 PMbitter-ability-32190
03/07/2022, 7:33 PM