We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
构造Advice时,虽然用到了lazyGet,避免了一些开销;但如果用户在切面需要用到方法名做判断,则还是会进行初始化。 仅仅为了获得方法签名,还需要进行一次loadClass,这个开销有点大,高并发时会有锁竞争问题。
jvm-sandbox/sandbox-api/src/main/java/com/alibaba/jvm/sandbox/api/listener/ext/AdviceAdapterListener.java
Line 66 in c01c28a
The text was updated successfully, but these errors were encountered:
收到,确实会有额外的开销。我考虑下如何修改。 不过高并发场景下,不推荐用AdviceListener,可否用EventListener来满足你的诉求?
Sorry, something went wrong.
@XHao 我在Advice上新增了3个方法,你看是否能满足你当前需求
/** * 获取触发调用事件的类名称 * * @return 触发调用事件的类名称 * @since {@code sandbox-api:1.4.1} */ public String getJavaClassName() { return javaClassName; } /** * 获取触发调用事件的方法名称 * * @return 触发调用事件的方法名称 * @since {@code sandbox-api:1.4.1} */ public String getJavaMethodName() { return javaMethodName; } /** * 获取触发调用事件的方法签名 * * @return 触发调用事件的方法签名 * @since {@code sandbox-api:1.4.1} */ public String getJavaMethodDesc() { return javaMethodDesc; }
fix: 修复问题#426
5f1bb1b
@XHao 我在Advice上新增了3个方法,你看是否能满足你当前需求 /** * 获取触发调用事件的类名称 * * @return 触发调用事件的类名称 * @since {@code sandbox-api:1.4.1} */ public String getJavaClassName() { return javaClassName; } /** * 获取触发调用事件的方法名称 * * @return 触发调用事件的方法名称 * @since {@code sandbox-api:1.4.1} */ public String getJavaMethodName() { return javaMethodName; } /** * 获取触发调用事件的方法签名 * * @return 触发调用事件的方法签名 * @since {@code sandbox-api:1.4.1} */ public String getJavaMethodDesc() { return javaMethodDesc; }
可以的,我本地也是加了类似的API。感谢!
oldmanpushcart
No branches or pull requests
构造Advice时,虽然用到了lazyGet,避免了一些开销;但如果用户在切面需要用到方法名做判断,则还是会进行初始化。
仅仅为了获得方法签名,还需要进行一次loadClass,这个开销有点大,高并发时会有锁竞争问题。
jvm-sandbox/sandbox-api/src/main/java/com/alibaba/jvm/sandbox/api/listener/ext/AdviceAdapterListener.java
Line 66 in c01c28a
The text was updated successfully, but these errors were encountered: