shixuan-git opened a new issue, #3975: URL: https://github.com/apache/fory/issues/3975
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/fory/issues) and found no similar issues. ### Version <img width="766" height="397" alt="Image" src="https://github.com/user-attachments/assets/8ca349f0-e70f-4769-8ae1-826da5029582" /> <img width="1409" height="439" alt="Image" src="https://github.com/user-attachments/assets/5c699b82-141a-4950-b5d9-73da7c3531ba" /> ### Component(s) Java ### Minimal reproduce step // 创建一个全局的 Fury 实例(线程安全) private static final ThreadSafeFory fury = Fory.builder() .withLanguage(Language.JAVA) .requireClassRegistration(false) .withMetaShare(true) .withCompatibleMode(CompatibleMode.COMPATIBLE) .withDeserializeNonexistentClass(true) // 异步编译减少阻塞时长 .withAsyncCompilation(true) .registerGuavaTypes(true) .buildThreadSafeFory(); public static <T> T deserialize(byte[] bytes, Class<T> clazz) { try { return (T) fury.execute(f -> { f.getSerializationContext().setMetaContext(new MetaContext()); return f.deserialize(bytes); }); } catch (Exception e) { log.error("FuryUtil deserialize error", e); return null; } } ### What did you expect to see? Java OpenJDK 21.0.1+12-LTS(Eclipse Temurin) GC ZGC + ZGenerational(分代 ZGC) 堆 -Xms9600m -Xmx9600m(固定 9.6G,实际含 ZGC 元数据约 10G) 直接内存 -XX:MaxDirectMemorySize=2G(实测 DirectBuffer 约 311M) Metaspace 初始 256m / 上限 512m(实测 206M,稳定,无类加载器泄漏) ### What did you see instead? // 创建一个全局的 Fury 实例(线程安全) private static final ThreadSafeFory fury = Fory.builder() .withLanguage(Language.JAVA) .requireClassRegistration(false) .withMetaShare(true) .withCompatibleMode(CompatibleMode.COMPATIBLE) .withDeserializeNonexistentClass(true) // 异步编译减少阻塞时长 .withAsyncCompilation(true) .registerGuavaTypes(true) .buildThreadSafeFory(); public static <T> T deserialize(byte[] bytes, Class<T> clazz) { try { return (T) fury.execute(f -> { f.getSerializationContext().setMetaContext(new MetaContext()); return f.deserialize(bytes); }); } catch (Exception e) { log.error("FuryUtil deserialize error", e); return null; } } ### Anything Else? _No response_ ### Are you willing to submit a PR? - [ ] I'm willing to submit a PR! -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
