-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
ExtFilterMatcher 匹配类结构时希望能根据用户的配置省略部分操作 #292
Comments
收到建议,我们在v1.4.0版本实现 |
感觉subClass也可以顺带给处理了! |
@oldmanpushcart 下面这一步是不是会抵消上面说的优化?
|
@XHao 会...谢谢提醒,T_T,我再仔细测试下,我的不严谨,sorry |
赞同 |
1.4.0版本已经优化,希望继续反馈,我们继续迭代。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
目前的实现,在 com.alibaba.jvm.sandbox.core.util.matcher.ExtFilterMatcher#matchingClassStructure 里,是一定要执行以下两个操作的:
如图:
![image](https://user-images.githubusercontent.com/6010094/90615126-40215f00-e23e-11ea-911c-5572d47fb140.png)
但实际上如果用户在创建 EventWatchBuilder 时没有通过 hasInterfaceTypes 与 hasAnnotationTypes 进行声明,后续的操作是用不到上面获取到的对应数据的,即下图中选定的两个条件恒真,与入参具体数据无关:
![image](https://user-images.githubusercontent.com/6010094/90615509-d0f83a80-e23e-11ea-8086-982b659071ba.png)
而 getFamilyInterfaceClassStructures 与 getFamilyAnnotationTypeClassStructures 这两个操作的开销还挺大的,尤其是在对大量类进行增强的场景下:
![image](https://user-images.githubusercontent.com/6010094/90615701-1288e580-e23f-11ea-8a92-3c01dc7c16ea.png)
故希望在用户对需要增强的类没有声明 hasInterfaceTypes 与 hasAnnotationTypes 时,不执行这两个操作,预计 transform 的效率能提升 30% ~ 50%
The text was updated successfully, but these errors were encountered: