-
Notifications
You must be signed in to change notification settings - Fork 873
会大量加载类吗?java8 用g1,很快就会导致metaspace满了,然后fullgc #88
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
Comments
每个表达式都会生成一个匿名类(java lambda 对应的匿名类),因此如果你的表达式都是动态生成的,那么可能会生成大量的匿名类,占满 metaspace 就会触发 full gc。 如果你的表达式的规模是可控的,建议用 cache 模式或者预编译,参见 https://github.com/killme2008/aviator/wiki#%E7%BC%96%E8%AF%91%E8%A1%A8%E8%BE%BE%E5%BC%8F |
您好,请问我写的AviatorUtil如下:
|
请参见上面回复 |
exp="(cityLevel<4?double(0):cityLevel*-5)+cityFlightNum0.1+cityTrainNum0.4-(totalDist/directDist>1.2?(totalDist/directDist-1.2)*10000:double(0))"
会大量加载类吗?java8 用g1,很快就会导致metaspace满了,然后fullgc,jmap前几名如下:
、、、
5: 19409 1707992 java.lang.reflect.Method
6: 11704 1288432 java.lang.Class
7: 38961 1246752 java.util.concurrent.ConcurrentHashMap$Node
、、、
The text was updated successfully, but these errors were encountered: