by-reference q

Posted by TLTANG74 on 29-Apr-2014 16:25

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

All Replies

Posted by Thomas Mercer-Hursh on 29-Apr-2014 16:31

By reference provides no advantage across an AppServer boundary.  It silently converts to a copy.

Posted by Nigel Allen on 29-Apr-2014 18:47

Lisa,

You might like to take a look at this discussion.

community.progress.com/.../9522.aspx

Rgds

Nigel.

Posted by Matt Baker on 29-Apr-2014 21:22

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.

Posted by Frank Meulblok on 30-Apr-2014 06:12

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.

Posted by Mike Fechner on 30-Apr-2014 06:56

“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.”
 
For that reason it’s very handy that –mc is a client startup parameter.
 
You can use it for remote WebClients where compression is likely to have a positive impact but not on local clients where –mc may just increase the CPU load.
 
Von: Frank Meulblok [mailto:bounce-fmeulblo@community.progress.com]
Gesendet: Mittwoch, 30. April 2014 13:13
An: TU.OE.Development@community.progress.com
Betreff: RE: by-reference q
 
Reply by Frank Meulblok

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.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

This thread is closed