On Wed Jun 4 07:05:37 2025 +0000, Rémi Bernon wrote:
The shared object pointer is not cached right now, because reading the
handle entry should be lightweight enough, but we could otherwise keep it in the client-side objects array for instance. Actually did that, I think it's better than reading the object pointer back from the caller pointer.
Actually, I think reading from the caller’s pointer was better, the cache doesn’t seem necessary.
Also, reading from the shared memory always requires using the seq lock for data consistency, and we cannot just read the data directly from a shared object pointer.
No, checking seq isn’t always required, there are cases where it’s safe to read directly (whether we want to is a separate question). Some fields are guaranteed not to change unless modified by the current process. My point was about potential convenience in certain cases once more data is moved to shared memory, not about replacing all use cases. Anyway, we can revisit this when those cases come up.