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

Visualization issue using Python 3.12.4 #198

Open
belliriccardo opened this issue Jul 15, 2024 · 2 comments
Open

Visualization issue using Python 3.12.4 #198

belliriccardo opened this issue Jul 15, 2024 · 2 comments

Comments

@belliriccardo
Copy link

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:
image
And the (erroneous) one, using Python 3.12.4 (check those crazy times!):
image
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 the cProfile 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 😄

@jiffyclub
Copy link
Owner

So I can try to replicate this, what method are you using to invoke the profiler? python -m cProfile, or something else?

@belliriccardo
Copy link
Author

Hi @jiffyclub! Yes, I was just calling python -m cProfile -o output.prof script.py, no other particular arguments. If it can help, the program in question was a fork of nsiqcppstyle, a static code checker; it is a single threaded application. Right now I've upgraded to the latest 3.12.7 and modified the code even more, so I don't know if I can 100% reproduce the issue; however, seeming as a bunch of other people reacted to my issue, maybe others can also comment with a simpler reproducible example (since nsiqcppstyle requires an actual C/C++ repository and a bit of setup)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants