Skip to content

PERF: find_stack_level #45099

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

Closed
jbrockmendel opened this issue Dec 28, 2021 · 1 comment · Fixed by #45247
Closed

PERF: find_stack_level #45099

jbrockmendel opened this issue Dec 28, 2021 · 1 comment · Fixed by #45247
Assignees
Labels
Performance Memory or execution speed performance Warnings Warnings that appear or should be added to pandas

Comments

@jbrockmendel
Copy link
Member

jbrockmendel commented Dec 28, 2021

Profiling pandas/tests/groupby/test_function.py::test_builtins_apply I'm seeing 18.78 seconds spent in groupby.apply, with 14.06 of that spent in 1732 calls of find_stack_level.

Maybe we can make find_stack_level lazy so it is only called when the warning is actually issued?

@jbrockmendel jbrockmendel added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 28, 2021
@jreback
Copy link
Contributor

jreback commented Dec 28, 2021

yeah or could have a

show_warning method that only is executed in the warnjng block itself

eg

if :
show_warning(,,,)

@phofl phofl added the Performance Memory or execution speed performance label Dec 30, 2021
@lithomas1 lithomas1 added Warnings Warnings that appear or should be added to pandas and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jan 2, 2022
@lithomas1 lithomas1 self-assigned this Jan 7, 2022
@lithomas1 lithomas1 mentioned this issue Jan 7, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Memory or execution speed performance Warnings Warnings that appear or should be added to pandas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants