Skip to content

Improve package import time #2046

Closed
@wagoodman

Description

import prefect takes roughly 1.0 - 1.5 seconds. Much of the time is from importing docker, dask, requests, and other large packages.

It would be ideal for import prefect to be as fast as possible, which would reduce the prefect CLI startup time, as well as the time to start running flows.

It would be worth investigating:

  • which packages are taking the most time to load (via profimp, -X importtime, or similar)
  • loading 3rd party packages in a just-in-time fashion (deferred import)
  • removing unused imports (and enforcing in CI via pyflakes/autoflakes)

Activity

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

Metadata

Metadata

Assignees

Labels

enhancementAn improvement of an existing feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions