Author |
Message
|
WMBDEV1 |
Posted: Thu May 07, 2009 7:19 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
Sounds like you are making progress and I'm glad to hear the aggregation logic has now gone ad I suggested in your other thread.
The usage is still very high though. Please try just parsong the input alone, to see the results. Also follow the tecniques for writing the output tree |
|
Back to top |
|
 |
giorginus80 |
Posted: Thu May 07, 2009 8:16 am Post subject: |
|
|
 Centurion
Joined: 08 Jul 2008 Posts: 124 Location: Rome, Italy
|
WMBDEV1 wrote: |
The usage is still very high though. Please try just parsong the input alone, to see the results. Also follow the tecniques for writing the output tree |
But I see that the memory goes higher when it builds the Environment tree that I used to keep the answers (primary keys generated from db), I build it using XMLNSC and at the end of the splits I send it to a queue. Where am I wrong?
I changed my code in:
Code: |
DECLARE InputMessage REFERENCE TO InputRoot.MRM.ns:body.ns:crediti;
DECLARE Inner_No INTEGER 0;
MOVE InputMessage FIRSTCHILD NAMESPACE ns NAME 'credito';
DECLARE currResults REFERENCE TO Environment;
CREATE LASTCHILD OF Environment.Variables AS currCrediti DOMAIN('XMLNSC');
CREATE LASTCHILD OF currResults NAMESPACE ns NAME 'results';
WHILE LASTMOVE(InputMessage)
DO
IF Inner_No >= 1 THEN
DELETE PREVIOUSSIBLING OF InputMessage;
END IF;
SET Inner_No = Inner_No + 1;
SET OutputRoot.Properties = InputRoot.Properties;
SET OutputRoot.XMLNSC.ns:credito = InputMessage;
PROPAGATE TO TERMINAL 'out1';
MOVE InputMessage NEXTSIBLING REPEAT NAME;
END WHILE;
SET OutputRoot.Properties = InputRoot.Properties;
SET OutputRoot.XMLNSC = currResults;
PROPAGATE TO TERMINAL 'out2'; --TO MQ QUEUE
|
and at the end of other esql node split I build the Environment.Variables.
Last edited by giorginus80 on Fri May 08, 2009 2:25 am; edited 2 times in total |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Thu May 07, 2009 10:29 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
You are still trying to delete from the input root and still aren't doing anything clever with the output.
Reread the doc I sent. All the answers are in there |
|
Back to top |
|
 |
giorginus80 |
Posted: Fri May 08, 2009 1:27 am Post subject: |
|
|
 Centurion
Joined: 08 Jul 2008 Posts: 124 Location: Rome, Italy
|
WMBDEV1 wrote: |
You are still trying to delete from the input root and still aren't doing anything clever with the output.
Reread the doc I sent. All the answers are in there |
ok now I don't delete the InputRoot. I was thinking even if it's readonly, in debug I noticed that when I delete the previous sibilling I can see it removed, in debug. Now I reread well the document, because I can't see where the memory is consumed bulding environment or outputroot! |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Fri May 08, 2009 2:08 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
The first thing I would do, before building the outputroot is to ensure the inputroot is being handled in a small amount of memory. Say less than 200MB (as 80MB is used as the footprint for the EG). Can you tell me how much it is using just for the input?
Are you now deleting from the environment? If you paste you rlatest attempt i'll have a look for you.....
The code to write the output tree is provided at the bottom of page 6 (but you should use the XMLNSC domain and not the XML one) but id make sure your input is parsed efficiently first. |
|
Back to top |
|
 |
giorginus80 |
Posted: Fri May 08, 2009 2:22 am Post subject: |
|
|
 Centurion
Joined: 08 Jul 2008 Posts: 124 Location: Rome, Italy
|
WMBDEV1 wrote: |
The first thing I would do, before building the outputroot is to ensure the inputroot is being handled in a small amount of memory. Say less than 200MB (as 80MB is used as the footprint for the EG). Can you tell me how much it is using just for the input?
Are you now deleting from the environment? If you paste you rlatest attempt i'll have a look for you.....
The code to write the output tree is provided at the bottom of page 6 (but you should use the XMLNSC domain and not the XML one) but id make sure your input is parsed efficiently first. |
Ok, I don't know how to calculate the amount of memory used by inputroot, but I think is less than 200MB, but maybe my error is writing the Environment.Variables? now I show you the code that is executed at the end of every splitted credit to build the environment. After the split there are just DB Insert (no memory allowed I think) and at the end of this I have a XMLNSC message with just 3 fields: Primary key, or Error code and Error Text.
Code: |
DECLARE envXML REFERENCE TO Environment.Variables.XMLNSC.ns:results;
DECLARE currResult REFERENCE TO Environment.Variables.XMLNSC.ns:results;
CREATE LASTCHILD OF envXML AS currResult NAMESPACE ns NAME 'result';
SET currResult = InputRoot.XMLNSC.ns:result;
SET currCredito.ns:idPosCreditoria=primaryKey;
SET currResult.ns:scarto.ns:DescrizioneScarto = Label;
SET currResult.ns:scarto.ns:TipoScarto = Error;
|
This code is repeated for every split. |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Fri May 08, 2009 2:45 am Post subject: aaaaaaaarrrrrrrggggggghhhhhhhh |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
Nowhere here are you deleting the environment resources as they are used.
You also dont show how the environment is populated.
This looks like you are building the output message and not how you are handling the input message as I requested.
To work out how much memory is used just by parsing the input tree comment out anything that writes to the output / does anything else and then put your message watching the memory usage.
I dont know what more help I can offer now, the questions I am asking are not being answered satisfactorily so i'm really struggling. The answers are all in the document I sent and you may now have to rely on the help of others who are maybe better at explaining themselves than me. |
|
Back to top |
|
 |
giorginus80 |
Posted: Fri May 08, 2009 2:48 am Post subject: Re: aaaaaaaarrrrrrrggggggghhhhhhhh |
|
|
 Centurion
Joined: 08 Jul 2008 Posts: 124 Location: Rome, Italy
|
WMBDEV1 wrote: |
Nowhere here are you deleting the environment resources as they are used.
You also dont show how the environment is populated.
This looks like you are building the output message and not how you are handling the input message as I requested.
To work out how much memory is used just by parsing the input tree comment out anything that writes to the output / does anything else and then put your message watching the memory usage.
I dont know what more help I can offer now, the questions I am asking are not being answered satisfactorily so i'm really struggling. The answers are all in the document I sent and you may now have to rely on the help of others who are maybe better at explaining themselves than me. |
Now I do exactly the code in the document, and I let you know the new memory usage. I'm a newbie of the WMB.  |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Fri May 08, 2009 2:57 am Post subject: Re: aaaaaaaarrrrrrrggggggghhhhhhhh |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
giorginus80 wrote: |
I'm a newbie of the WMB.  |
And this is not a training resource!
If you are struggling with the concepts used by myself / the document I sent then it might be a good idea to get some formal training / take on specialist resource to help you further...... you have my details (sorry if this is touting for work but i've helped all I can over the forum..... really I have!) |
|
Back to top |
|
 |
|