-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
PERF cache find_stack_level #48023
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
PERF cache find_stack_level #48023
Conversation
b5af79e
to
6358e23
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice - LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM. I'm just a little uneasy at the number of changes the change to the function signature caused.
Thanks @MarcoGorelli |
cache stacklevel
Good day, |
This reverts commit 2f8d0a3.
Coincidentally. The day before yesterday I spent nearly two days to locate an OOM problem, and finally found that it was caused by the |
Revert "PERF cache find_stack_level (pandas-dev#48023)" This reverts commit 2f8d0a3. Co-authored-by: MarcoGorelli <> (cherry picked from commit 0106c26)
Thanks for reporting, version 1.5.1 (probably coming out Monday) will fix this |
cache stacklevel
Revert "PERF cache find_stack_level (pandas-dev#48023)" This reverts commit 2f8d0a3. Co-authored-by: MarcoGorelli <>
This would be a precursor to #47998 and #47828. If repeatedly calling
find_stack_level
, then performance takes a hitDemo of impact: if we run the file
On main:
Using find_stack_level in
pandas/pandas/_libs/tslibs/parsing.pyx
Line 217 in 6db95e7
and
pandas/pandas/_libs/tslibs/parsing.pyx
Line 225 in 6db95e7
Using find_stack_level in the same places as above, but with caching (as in this branch):