You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The example has this line of code and proceeding comment:
PostalCodeRange range = entry.value().get();
// Access the off-heap memory directly, by calling range
// object getters.
// This is very rewarding, when the value has a lot of fields
// and expensive to copy to heap all of them, when you need to access
// just a few fields.
The comment seems to suggest that invoking getters would only deserialize the relevant part of the object from the off-heap storage.
However from poking around the source it seems to me that entry.value() returns a CompiledMapQueryContext$EntryValueBytesData (which I have confirmed in a pet project) and the get() method deserializes the entire value into a cached object. Really no different from calling getUsing() and passing in your own object.
My belief is the comment is simply incorrect. But looking for confirmation?
The text was updated successfully, but these errors were encountered:
There is some potential misinformation in an example from the tutorial titled "Working with an entry within a context"
The example has this line of code and proceeding comment:
The comment seems to suggest that invoking getters would only deserialize the relevant part of the object from the off-heap storage.
However from poking around the source it seems to me that
entry.value()
returns aCompiledMapQueryContext$EntryValueBytesData
(which I have confirmed in a pet project) and theget()
method deserializes the entire value into a cached object. Really no different from callinggetUsing()
and passing in your own object.My belief is the comment is simply incorrect. But looking for confirmation?
The text was updated successfully, but these errors were encountered: