Skip to content

How much would the hook wrapping affect the execution time? #217

@nnop

Description

@nnop

Say my application is a concurrent application and the hook implementation is applied to a great amount of data, which means it would be executed thousands of times.
So, how much is the wrapping work by pluggy affect the execution time?

I red the code and saw there is a relatively long chain from pm.hook.method() calling to the actual implementation.

Below is my summary of the calling chain:

From pm.hook.method which is actually a _HookRelay instance to
-> _HookCaller.__call__
-> PluginManager._hookexec
-> PluginManager._inner_hookexec
-> _multicall in callers.py
-> HookImpl.funcion is the actual hook implmentation

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions