Skip to content

conda activate performance regressions #13567

Open

Description

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

The time needed for conda activate has gone up in the recent versions again.
We made some performance improvements for conda>=4.6 in gh-7122 and conda>=23.5 in gh-12550, but have quickly regressed on this in recent versions.

The following gives an overview of conda shell.posix activate run times and

  • uses python=3.8 so we can compare over a wide range of conda versions,
  • uses setuptools=58 for conda<=23.5 to factor out the impact of setuptools>=60's distutils injection,
  • uses ruamel.yaml=0.16 since later versions got slower to import (tracking this upstream in https://sourceforge.net/p/ruamel-yaml/tickets/504/ ; already figured out the culprits/needed changes; will work with upstream to address this),
  • has ruamel_yaml forcefully removed for the older conda versions to ensure the specified ruamel.yaml is used,

and was run on Linux 6.6.10, glibc 2.17, packages from conda-forge (apart from defaults::conda=24.1.0), with environments in memory on a tmpfs, and scaling governor/energy performance preference set to performance/performance on a 6 year old laptop with an i7-8550U.
(Running the same with powersave/powersave CPU settings causes times to rise upward of 200ms for the latest versions, i.e., very noticible delays.)

time conda ruamel.yaml setuptools python notes
0.128s 4.7.12 0.16.12 68.2.2 3.8.18 slow due to setuptools>=60's distutils (fixed in gh-12550)
0.065s 4.7.12 0.16.12 58.5.3 3.8.18 no python=3.8-compatible builds for <=4.6 available, so this is base
0.065s 4.8.5 0.16.12 58.5.3 3.8.18
0.065s 4.9.2 0.16.12 58.5.3 3.8.18
0.065s 4.10.3 0.16.12 58.5.3 3.8.18
0.065s 4.11.0 0.16.12 58.5.3 3.8.18
0.065s 4.12.0 0.16.12 58.5.3 3.8.18
0.078s 4.13.0 0.16.12 58.5.3 3.8.18 .exceptions (fixed in gh-12550) and .gateways.logging imports in .cli.main
0.078s 4.14.0 0.16.12 58.5.3 3.8.18
0.089s 22.09.0 0.16.12 58.5.3 3.8.18 non-vendored toolz import (fixed in gh-12550)
0.092s 22.11.1 0.16.12 58.5.3 3.8.18
0.087s 23.1.0 0.16.12 58.5.3 3.8.18
0.090s 23.3.1 0.16.12 58.5.3 3.8.18 .cli.conda_argparse import in .cli.main (fixed in gh-12550); packaging.version import in deprecations
0.071s 23.5.2 0.16.12 58.0.4 3.8.18 first version after gh-12550
0.072s 23.5.2 0.16.12 68.2.2 3.8.18
0.076s 23.7.4 0.16.12 68.2.2 3.8.18 argparse import in .deprecations
0.085s 23.9.0 0.16.12 68.2.2 3.8.18 inspect import via deprecated.constant usage; gateways.logging import in base.context
0.088s 23.11.0 0.16.12 68.2.2 3.8.18 platformdirs import in .base.context
0.088s 24.1.0 0.16.12 68.2.2 3.8.18

I've already prepared and tested the changes necessary to address those issues noted in the table above which have not already been covered by @jaimergp's work in gh-12550; I'll open a PR for this in the next few days.

Conda Info

No response

Conda Config

No response

Conda list

No response

Additional Context

No response

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

Metadata

Assignees

Labels

clipertains to the CLI interfaceplugins::activatepertains to conda-activate or conda-deactivateseverity::2critical; broken functionality with an unacceptably complex workaroundsource::contributorcreated by a frequent contributortag::performancerelated to degraded performancetype::bugdescribes erroneous operation, use severity::* to classify the type

Type

No type

Projects

  • Status

    🏗️ In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions