Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hooks can slow down execution in some cases #4505

Closed
astrojuanlu opened this issue Feb 20, 2025 · 5 comments
Closed

Hooks can slow down execution in some cases #4505

astrojuanlu opened this issue Feb 20, 2025 · 5 comments

Comments

@astrojuanlu
Copy link
Member

Description

I'm talking to a user who reported that their hooks are incredibly slow, taking 82 % of the total kedro run time, which amounts to several minutes. I attach the profiling.

CPU_profile_for_Program_kedro_run_env_ai_nodes_multivariate_predict_sales_at_2025_02_20T08_44_27.speedscope.json

Context

Massively slow running times.

Steps to Reproduce

(TBC)

Expected Result

Actual Result

-- If you received an error, place it here.
-- Separate them if you have more than one.

Your Environment

  • Kedro version used (pip show kedro or kedro -V): kedro 0.18.4
  • Python version used (python -V):
  • Operating system and version:
@astrojuanlu
Copy link
Member Author

As far as I interpret it, most of the time is being spent rendering some very large pandas DataFrame inside Pluggy:

Image

I suspect, but cannot prove, that it might be related to #2630, which was introduced by #2596

in other words, Pluggy tracing is producing messages that, despite being invisible to the user, require huge pandas dataframes to be turned into strings.

I could be wrong here though, but hope it serves as a place to start.

@ElenaKhaustova
Copy link
Contributor

@astrojuanlu do you mean this issue?
#4504

@astrojuanlu
Copy link
Member Author

Wow, perfect timing. Yes, that.

@ElenaKhaustova
Copy link
Contributor

Wow, perfect timing. Yes, that.

Then we don't need two tickets, right? So, if you don't mind, I'm going to close this one in favour of the original one.

@astrojuanlu
Copy link
Member Author

Yes 🙏🏼

@github-project-automation github-project-automation bot moved this from Wizard inbox to Done in Kedro Wizard 🪄 Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants