Author |
Message
|
bhumulas |
Posted: Mon Jun 01, 2009 7:42 am Post subject: too many reference variables? |
|
|
Apprentice
Joined: 17 Feb 2006 Posts: 41
|
Will there be any performance implications, if we use too many reference variables (passing environment tree to common routines) in ESQL?
Kindly advise. |
|
Back to top |
|
 |
AkankshA |
Posted: Mon Jun 01, 2009 7:50 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
depends on how many is too many..... _________________ Cheers |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jun 02, 2009 4:53 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Depends on what your performance requirements are.
There's always performance implications from every choice. Whether the implication is meaningful or not is an entirely different question. |
|
Back to top |
|
 |
bhumulas |
Posted: Wed Jun 03, 2009 6:24 am Post subject: |
|
|
Apprentice
Joined: 17 Feb 2006 Posts: 41
|
Let me put my question in this way:
Option 1:
set Environment.Variables.ID='XXX';
.
.
set myvariableID=Environment.Variables.ID;
Option 2:
DECLARE refEnv Environment.Variables;
call setID(refEnv, 'xxx');
.
.
.
call getID(refEnv) into myvariableID;
I have those two options, if I use the second option, will there be any performance issues compare to the option 1?
We are having around 100+ variables in environment tree.
Thinking references are nothing but pointers, so hoping there wont be any performance issues, but would like to know suggestions. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jun 03, 2009 7:57 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The performance of those two choices will be different.
That difference will likely be small, but it will be there.
We can't tell you if that difference will matter or not. We don't know if you are trying to process 1 message an hour or 100,000 messages an hour. |
|
Back to top |
|
 |
vmcgloin |
Posted: Wed Jun 03, 2009 8:21 am Post subject: |
|
|
Knight
Joined: 04 Apr 2002 Posts: 560 Location: Scotland
|
I'd be more concerned about what you are doing with '100+ variables in environment tree' and whether you are tidying them up when you are finished with them. |
|
Back to top |
|
 |
bhumulas |
Posted: Wed Jun 03, 2009 8:56 am Post subject: |
|
|
Apprentice
Joined: 17 Feb 2006 Posts: 41
|
Thanks for all your comments.
We could get 5000 msgs per hour, which we need to respond in 6 sec per (including service call) each message.
The main use of environment tree in our application is to populate output tree values, as we have many services in between before building the output tree. All the intermediate service calls depends on input root values. We need to keep the environment tree variables until we build the output tree.
As a process of abstracting environment variables, we thought of keeping a separate ESQL file with all set/get methods. If we follow this approach we need REFERENCE variables in all the methods.
Hence taking all your inputs, in terms of performance trade-off between Option 1 and Option 2 (which I specified earlier). |
|
Back to top |
|
 |
|