WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Performance improvement opportunity #180

@ericwinger

Description

@ericwinger

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions