My understanding (we go back and forth with subjective “my understandings” because these details are not documented) is that the laziness on the server is less aggressive than the laziness on the client.
So you have fewer calls to the database if you make it a dict
on the server side rather than on the client side and you have only one round trip if you make sure that the dict
has everything rather than returning the SearchIterator
and having the client fetching stuff when needed.
The SearchIterator
laziness:
- helps a little (smaller data transfer) the client side code that does not need to access the lazy bits
- hurts a lot (more round trips) the client side code that needs them
- same on the server side code, but with a lesser extent because there is no roundtrip overhead and because the row objects seem to be less lazy on the server side
So I have learned to use dictionaries instead of SearchIterator
or Row objects on the client.