-
Notifications
You must be signed in to change notification settings - Fork 5
Description
I had a thought about how to make the RSR transport mechanism more efficient. What if RSR didn't carry the information for inst vars with a value of nil?
Looking at RsrServiceSnapshot>>#reifyIn:, it looks like RSR expects that all the inst var names and their values be present in the referenceStream. But what if the referenceStream only contained inst vars names & values which were non-nil? You could carry an integer mapping that could be used in the instVarAt:put send.
something like:
map = <get map from reference stream. >
map do: [:instVarSlot |
instance instVarAt: instVarSlot put: (referenceStream next resolve: aConnection)].
^instance
If thousands of objects are returned and each object has 30-40 inst vars of which only a few inst vars are populated, it could save some transit time.
I did some experiments by using a different service object with only the minimal slots (allInstVars size = 15) and converting them to the "full" service object on the client (allInstVars size = 48) after replication - trying to simulate my idea as best I can. 1043 instances.
The round trip time dropped from 985ms to 670ms on uffda running both the client and server. (edited)
About a 30% savings