wu-sheng commented on issue #6915: URL: https://github.com/apache/skywalking/issues/6915#issuecomment-835369881
> That means lifecycle of `MethodInvocationContext` started before `beforeMethod(...)` and destroied after `afterMethod(...)`? Yes, and it should be created and disposed of when v2 APIs activated. So v2 APIs should be an option and enhanced version of v1. That is why I said, v1 may not be removed ever. Even with a tiny extra load(one more object created and GC), V2 is slower(very little) than V1, purely from intercepting perspective. But when we use it in the right place, to provide more context for `afterMethod` and make RunningContext easier and less to use, we could have a better performance from agent + plugin perspective, which is end user's real feeling. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
