Skip to content
New issue

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

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

Already on GitHub? # to your account

Some things we can learn from pytypes #38

Open
gvanrossum opened this issue Nov 22, 2017 · 3 comments
Open

Some things we can learn from pytypes #38

gvanrossum opened this issue Nov 22, 2017 · 3 comments

Comments

@gvanrossum
Copy link
Contributor

I checked the profiling hook in pytypes, and they do two things we should also do:

  • save and restore the previously active profiler
  • in a thread, when the profiling callback is run after profiling has been stopped, reset the hook
    (note: this should only be done after it's been stopped -- not after it's been paused)
@gvanrossum
Copy link
Contributor Author

Moreover if a previous profiler is already running they pass events to that too!

@gvanrossum
Copy link
Contributor Author

Lots of other stuff too, e.g. their utilities for finding the actual function. (OTOH I don't see any downsampling or other speed hacks in their code.)

@Stewori
Copy link

Stewori commented Nov 22, 2017

Yes, the downsampling idea is something we can learn from pyannotate. I will surely add this.

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

No branches or pull requests

2 participants