Hello,
I am reading the manual about the by-reference, and wonder if it would gain me any performance by using it in an app-server environment. It looks to me it won't, but I would like to confirm.
Assume I have a windows client calls a program on appserver
run a.p on hAppserver (output table tt-customer).
The appserver is on linux. Would add "by reference" gain any performance?
Thanks in advance.
Lisa
By reference provides no advantage across an AppServer boundary. It silently converts to a copy.
Lisa,
You might like to take a look at this discussion.
community.progress.com/.../9522.aspx
Rgds
Nigel.
The temp-table will be serialized and sent across the wire when making the appserver call. By-reference is only for in-memory calls where the pointer is passed instead of a deep copy of the temp-table since passing the pointer itself can't be done between processes like this.
As others explained, BY-REFERENCE will only work within a single instance of the AVM - either the AppServer client or the AppServer agent. Going from one to the other will always be by-value.
If you're looking to gain performance in that scenario, you'll want to look into:
- Schema marshalling (-ttmarshal startup parameter / SCHEMA-MARSHAL attribute of the temp-tables): cuts down the amount of metadata sent over the connection
- Appserver message compression (-mc startup parameter). May or may not be worthwhile; compression/decompression algorithms have their own overhead to take into account which can nullify any benefit from sending compressed vs. uncompressed data. So benchmark before deciding when and where to use this.
As others explained, BY-REFERENCE will only work within a single instance of the AVM - either the AppServer client or the AppServer agent. Going from one to the other will always be by-value.
If you're looking to gain performance in that scenario, you'll want to look into:
- Schema marshalling (-ttmarshal startup parameter / SCHEMA-MARSHAL attribute of the temp-tables): cuts down the amount of metadata sent over the connection
- Appserver message compression (-mc startup parameter). May or may not be worthwhile; compression/decompression algorithms have their own overhead to take into account which can nullify any benefit from sending compressed vs. uncompressed data. So benchmark before deciding when and where to use this.
Flag this post as spam/abuse.