Skip to content

Cache created modules-tool #3772

@Flamefire

Description

@Flamefire

The initialization of the modules-tool class is rather expensive. It involves checking the module alias, commands and modifies the $MODULEPATH several times.

For every EasyConfig and EasyBlock instance at least 1 such modules-tool is created which hence has quite some impact when processing multiple ECs especially with many dependencies.

Proposal: modules_tool in easybuild/tools/modules.py should cache the generated modules tool and return that if the class choice has not changed. I.e. cache in a dictionary indexed by the class

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions