Creating zip files with zipfile is unfortunately very slow and as a result can very regularly be the critical path for a Bazel build that includes python targets with large dependencies (e.g. scipy, matplotlib, etc..). The slowness impacts a build twice, once as the archive is created and again when it's unpacked. To avoid this, an alternative "runfiles collection" is introduced which is backed by standard runfiles and a json file of sources to include in the "runfiles directory" and ultimately the venv.
Creating zip files with zipfile is unfortunately very slow and as a result can very regularly be the critical path for a Bazel build that includes python targets with large dependencies (e.g. scipy, matplotlib, etc..). The slowness impacts a build twice, once as the archive is created and again when it's unpacked. To avoid this, an alternative "runfiles collection" is introduced which is backed by standard runfiles and a json file of sources to include in the "runfiles directory" and ultimately the venv.