-
Notifications
You must be signed in to change notification settings - Fork 140
Visualization issue using Python 3.12.4 #198
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
Comments
So I can try to replicate this, what method are you using to invoke the profiler? |
Hi @jiffyclub! Yes, I was just calling |
I think there might be something going on with both snakeviz and the underlying python profiler in 3.12*. @jiffyclub Here is some code to reproduce the issue I am seeing: import time
def slow_function():
[i**i for i in range(10_000)]
time.sleep(5)
return None
Timing this from JupyterLab gives different results for both Python 3.11.5The output is as expected. Python 3.12.2Examples of issues in 3.12 include that |
Thanks @joelostblom, I'm seeing this weirdness with Python 3.12 too. Seems like something changed in how cProfile is recording/presenting the caller/callee information that I'm going to have to figure out. |
Hi! First of all I wanted to thanks the author for this great profiling library, I use it extensively as a quick and intuitive check of what might be taking too much time in my code.


I recently upgraded to Python 3.12.4, and by profiling the same script with two different python versions I get two very different results: the (correct) one using Python 3.11.9:
And the (erroneous) one, using Python 3.12.4 (check those crazy times!):
I've looked around to check what could cause this
method 'disable' of '_lsprof.Profiler' objects
issue, and it seems to indicate a misuse of thecProfile
module from within Python itself; this is not the case in my script as I don't use it at all in my code, and just as an external module.Then I looked up the changes from 3.11 to 3.12 and found PEP 669; maybe this is causing the issue? I also saw PR #195, so if this is an already known problem I'm sorry for wasting some of your time and consider this issue as a "+1" to that request 😄
The text was updated successfully, but these errors were encountered: