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

Some things we can learn from pytypes #38

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

Comments

@gvanrossum
Copy link
Member

commented Nov 22, 2017

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

This comment has been minimized.

Copy link
Member Author

commented Nov 22, 2017

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

@gvanrossum

This comment has been minimized.

Copy link
Member Author

commented Nov 22, 2017

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

This comment has been minimized.

Copy link

commented Nov 22, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.