<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif">On Tue, Jun 11, 2024 at 11:38 AM Alan Bateman <<a href="mailto:Alan.Bateman@oracle.com">Alan.Bateman@oracle.com</a>> wrote:</span><br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div>
<br>
<br>
<div>On 11/06/2024 17:27, David Lloyd wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<div style="font-family:arial,helvetica,sans-serif">:<br>
</div>
</div>
<div class="gmail_quote">
<div><br>
</div>
<div style="font-family:arial,helvetica,sans-serif">Yes, all of
the method-access methods on ReflectionFactory are used, not
just for readObject/writeObject but also readObjectNoData,
readResolve, and writeReplace, the constructor accessors,
and the factory methods for OptionalDataException. We don't
use the static initializer one though (maybe the ORB does,
I'm not sure).</div>
</div>
<br>
</div>
</blockquote>
Okay, next question is whether you are also using Unsafe to access
the fields of classes where you've got a MH to invoke the
readXXX/writeXXX methods? Ignore SVUID for the moment.<br></div></blockquote><div><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">For "normal" objects, no; we invoke readXXX/writeXXX if they're available with our OIS/OOS proxy object. We are using Unsafe to initialize the handler of reflection proxy instances though, on the deserialization side, and similarly for certain fields of some "known" classes for optimization purposes, though if these classes had readXXX/writeXXX we could probably do that another way (albeit at a performance penalty, in all likelihood).</div></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">- DML • he/him<br></div></div></div>