Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
rework Instrument API to allow efficient implementation #257
The Instrument API potentially adds overhead, since we have to call the hooks at all kinds of low level places that might be happening in tight loops. I'm not really worried about the overhead right now, but we should make sure that if we do decide to optimize it in the future, that we won't have to break the API to do so.
I think there are two parts to this:
Regarding introspecting the instrument object to tell which hooks it provides: I think it's sufficient to detect either (a) the method is undefined, or (b) the method is inherited from the do-nothing