Skip to content

load module cost too much time when parse dagbag in DagBag#process_file #15833

Description

@ZhendongBai

the airflow scheduler load module cost too much time in method airflow.models.dagbag.DagBag#process_file
Airflow version: 1.10.4

What happened:

  1. as we known , imp.load_source(mod_name, filepath) in airflow.models.dagbag.DagBag#process_file is a time cost operation,sometimes it may cost more than 1 minute, is where any better way to load module?
  2. and I use the version 1.10.4, useimp.load_source(mod_name, filepath) to load module, and the version 2.x , use importlib to load module, so I want to ask a quastion - importlib is more efficent than imp ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:bugThis is a clearly a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions