Conversation
032a008 to
b6316c8
Compare
|
Hey @adwsingh, I have a couple of questions:
|
|
@timocov great questions. I can answer the first two.
Possibly, but that was not really the main motivation behind Schema Extensions. What I have been running into more and more is the need to keep caches keyed by Schema, and then look them up multiple times within a single request. Schema Extensions are meant to address that by letting us compute data that depends only on the Schema once, and then attach it directly to the Schema itself.
I do not think so. Each SchemaExtensionProvider uses its own key to store a value on the Schema, and two SchemaExtensionKeys cannot have the same id. |
f21b56a to
50aa1c3
Compare
50aa1c3 to
14a678e
Compare
14a678e to
9930568
Compare
15aa1a7 to
9377301
Compare
| import java.util.concurrent.atomic.AtomicReferenceArray; | ||
|
|
||
| /** | ||
| * Virtual-thread-friendly buffer pool for JSON serialization. |
There was a problem hiding this comment.
You say it's virtual thread friendly here, but the next paragraph says you don't use pooling in vts. IME, buffer pooling is still useful even with VTs though (e.g., in the vt HTTP client I made). Did you benchmark this and see otherwise?
There was a problem hiding this comment.
Its VT friendly in the sense that it doesn't cause a leak for VTs. We can't use this for VTs in its current form because of reliance on Thread Ids. We could have something like a ConcurrentLinkedDeque like Jackson's RecyclerPool but that is in general less performant on platform threads.
I am adding a TODO to better handle VTs.
1f3df85 to
8d3571c
Compare
8d3571c to
7178198
Compare
8350031 to
c898175
Compare
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.