apache / incubator-fury

A blazingly fast multi-language serialization framework powered by JIT and zero-copy.

Home Page:https://fury.apache.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[java]ThreadLocalFury has performance issues under virtual threads in jdk21

gongziyiyi opened this issue · comments

Is your feature request related to a problem? Please describe.

ThreadLocal has performance issues under virtual threads in jdk21

Describe the solution you'd like

maybe use CarrierThreadLocal ??

Will It create lots of Fury objects? For example, if we have million of virtual threads, will we have millions of Fury object?

@chaokunyang
Yes. CarrierThreadLocal can fix it, but unfortunately, it has not been leaked for external use and can only be opened with "--add-opens" at the moment

We may need to add a new maven module to fury/java.

And I'm wondering whether can we use ThreadPoolFury, which use an object pool. This may be more friently to virtual thread